<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998

************************************************************************
*                                                                      *
\section[FloatIn]{Floating Inwards pass}
*                                                                      *
************************************************************************

The main purpose of @floatInwards@ is floating into branches of a
case, so that we don't allocate things, save them on the stack, and
then discover that they aren't needed in the chosen branch.
-}</span><span>
</span><span id="line-14"></span><span>
</span><span id="line-15"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-16"></span><span class="hs-pragma">{-# OPTIONS_GHC -fprof-auto #-}</span><span>
</span><span id="line-17"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}</span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.Core.Opt.FloatIn</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#floatInwards"><span class="hs-identifier">floatInwards</span></a></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span class="hs-cpp">

#include &quot;HsVersions.h&quot;
</span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.html"><span class="hs-identifier">GHC.Core</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Make.html"><span class="hs-identifier">GHC.Core.Make</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.Make.html#wrapFloats"><span class="hs-identifier">wrapFloats</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html"><span class="hs-identifier">GHC.Driver.Types</span></a></span><span>     </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier">ModGuts</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Utils.html"><span class="hs-identifier">GHC.Core.Utils</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html"><span class="hs-identifier">GHC.Core.FVs</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html"><span class="hs-identifier">GHC.Core.Opt.Monad</span></a></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier">CoreM</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Id.html"><span class="hs-identifier">GHC.Types.Id</span></a></span><span>         </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isOneShotBndr"><span class="hs-identifier">isOneShotBndr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#idType"><span class="hs-identifier">idType</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isJoinId"><span class="hs-identifier">isJoinId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Id.html#isJoinId_maybe"><span class="hs-identifier">isJoinId_maybe</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.html"><span class="hs-identifier">GHC.Types.Var</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Core.Type.html"><span class="hs-identifier">GHC.Core.Type</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html"><span class="hs-identifier">GHC.Types.Var.Set</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html"><span class="hs-identifier">GHC.Types.Basic</span></a></span><span>      </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#RecFlag"><span class="hs-identifier">RecFlag</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#isRec"><span class="hs-identifier">isRec</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span class="hs-comment">{-
Top-level interface function, @floatInwards@.  Note that we do not
actually float any bindings downwards from the top-level.
-}</span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#floatInwards"><span class="hs-identifier hs-type">floatInwards</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier hs-type">ModGuts</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.Monad.html#CoreM"><span class="hs-identifier hs-type">CoreM</span></a></span><span> </span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier hs-type">ModGuts</span></a></span><span>
</span><span id="line-47"></span><span id="floatInwards"><span class="annot"><span class="annottext">floatInwards :: ModGuts -&gt; CoreM ModGuts
</span><a href="GHC.Core.Opt.FloatIn.html#floatInwards"><span class="hs-identifier hs-var hs-var">floatInwards</span></a></span></span><span> </span><span id="local-6989586621680959799"><span class="annot"><span class="annottext">pgm :: ModGuts
</span><a href="#local-6989586621680959799"><span class="hs-identifier hs-var">pgm</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Driver.Types.html#ModGuts"><span class="hs-identifier hs-type">ModGuts</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mg_binds :: ModGuts -&gt; CoreProgram
</span><a href="GHC.Driver.Types.html#mg_binds"><span class="hs-identifier hs-var">mg_binds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621680959796"><span class="annot"><span class="annottext">CoreProgram
</span><a href="#local-6989586621680959796"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621680959795"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680959795"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreM DynFlags
forall (m :: * -&gt; *). HasDynFlags m =&gt; m DynFlags
</span><a href="GHC.Driver.Session.html#getDynFlags"><span class="hs-identifier hs-var">getDynFlags</span></a></span><span>
</span><span id="line-49"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621680959793"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621680959793"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621680959795"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-50"></span><span>       </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">ModGuts -&gt; CoreM ModGuts
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModGuts
</span><a href="#local-6989586621680959799"><span class="hs-identifier hs-var">pgm</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">mg_binds :: CoreProgram
</span><a href="GHC.Driver.Types.html#mg_binds"><span class="hs-identifier hs-var">mg_binds</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Bind CoreBndr -&gt; Bind CoreBndr) -&gt; CoreProgram -&gt; CoreProgram
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Bind CoreBndr -&gt; Bind CoreBndr
</span><a href="#local-6989586621680959791"><span class="hs-identifier hs-var">fi_top_bind</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959793"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreProgram
</span><a href="#local-6989586621680959796"><span class="hs-identifier hs-var">binds</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-51"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-52"></span><span>    </span><span id="local-6989586621680959791"><span class="annot"><span class="annottext">fi_top_bind :: Platform -&gt; Bind CoreBndr -&gt; Bind CoreBndr
</span><a href="#local-6989586621680959791"><span class="hs-identifier hs-var hs-var">fi_top_bind</span></a></span></span><span> </span><span id="local-6989586621680959790"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959790"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-type">NonRec</span></a></span><span> </span><span id="local-6989586621680959788"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959788"><span class="hs-identifier hs-var">binder</span></a></span></span><span> </span><span id="local-6989586621680959787"><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959787"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-53"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreBndr -&gt; Expr CoreBndr -&gt; Bind CoreBndr
forall b. b -&gt; Expr b -&gt; Bind b
</span><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-var">NonRec</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959788"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959790"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr CoreBndr -&gt; CoreExprWithFVs
</span><a href="GHC.Core.FVs.html#freeVars"><span class="hs-identifier hs-var">freeVars</span></a></span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959787"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-54"></span><span>    </span><span class="annot"><a href="#local-6989586621680959791"><span class="hs-identifier hs-var">fi_top_bind</span></a></span><span> </span><span id="local-6989586621680959784"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959784"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-type">Rec</span></a></span><span> </span><span id="local-6989586621680959782"><span class="annot"><span class="annottext">[(CoreBndr, Expr CoreBndr)]
</span><a href="#local-6989586621680959782"><span class="hs-identifier hs-var">pairs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-55"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(CoreBndr, Expr CoreBndr)] -&gt; Bind CoreBndr
forall b. [(b, Expr b)] -&gt; Bind b
</span><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-var">Rec</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959781"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959784"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr CoreBndr -&gt; CoreExprWithFVs
</span><a href="GHC.Core.FVs.html#freeVars"><span class="hs-identifier hs-var">freeVars</span></a></span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959780"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959781"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959781"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959780"><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959780"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(CoreBndr, Expr CoreBndr)]
</span><a href="#local-6989586621680959782"><span class="hs-identifier hs-var">pairs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Mail from Andr\'e [edited]}
*                                                                      *
************************************************************************

{\em Will wrote: What??? I thought the idea was to float as far
inwards as possible, no matter what.  This is dropping all bindings
every time it sees a lambda of any kind.  Help! }

You are assuming we DO DO full laziness AFTER floating inwards!  We
have to [not float inside lambdas] if we don't.

If we indeed do full laziness after the floating inwards (we could
check the compilation flags for that) then I agree we could be more
aggressive and do float inwards past lambdas.

Actually we are not doing a proper full laziness (see below), which
was another reason for not floating inwards past a lambda.

This can easily be fixed.  The problem is that we float lets outwards,
but there are a few expressions which are not let bound, like case
scrutinees and case alternatives.  After floating inwards the
simplifier could decide to inline the let and the laziness would be
lost, e.g.

\begin{verbatim}
let a = expensive             ==&gt; \b -&gt; case expensive of ...
in \ b -&gt; case a of ...
\end{verbatim}
The fix is
\begin{enumerate}
\item
to let bind the algebraic case scrutinees (done, I think) and
the case alternatives (except the ones with an
unboxed type)(not done, I think). This is best done in the
GHC.Core.Opt.SetLevels module, which tags things with their level numbers.
\item
do the full laziness pass (floating lets outwards).
\item
simplify. The simplifier inlines the (trivial) lets that were
 created but were not floated outwards.
\end{enumerate}

With the fix I think Will's suggestion that we can gain even more from
strictness by floating inwards past lambdas makes sense.

We still gain even without going past lambdas, as things may be
strict in the (new) context of a branch (where it was floated to) or
of a let rhs, e.g.
\begin{verbatim}
let a = something            case x of
in case x of                   alt1 -&gt; case something of a -&gt; a + a
     alt1 -&gt; a + a      ==&gt;    alt2 -&gt; b
     alt2 -&gt; b

let a = something           let b = case something of a -&gt; a + a
in let b = a + a        ==&gt; in (b,b)
in (b,b)
\end{verbatim}
Also, even if a is not found to be strict in the new context and is
still left as a let, if the branch is not taken (or b is not entered)
the closure for a is not built.

************************************************************************
*                                                                      *
\subsection{Main floating-inwards code}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="hs-keyword">type</span><span> </span><span id="FreeVarSet"><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FreeVarSet"><span class="hs-identifier hs-var">FreeVarSet</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DIdSet"><span class="hs-identifier hs-type">DIdSet</span></a></span><span>
</span><span id="line-131"></span><span class="hs-keyword">type</span><span> </span><span id="BoundVarSet"><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#BoundVarSet"><span class="hs-identifier hs-var">BoundVarSet</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DIdSet"><span class="hs-identifier hs-type">DIdSet</span></a></span><span>
</span><span id="line-132"></span><span>
</span><span id="line-133"></span><span class="hs-keyword">data</span><span> </span><span id="FloatInBind"><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBind"><span class="hs-identifier hs-var">FloatInBind</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="FB"><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FB"><span class="hs-identifier hs-var">FB</span></a></span></span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#BoundVarSet"><span class="hs-identifier hs-type">BoundVarSet</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FreeVarSet"><span class="hs-identifier hs-type">FreeVarSet</span></a></span><span> </span><span class="annot"><a href="GHC.Core.Make.html#FloatBind"><span class="hs-identifier hs-type">FloatBind</span></a></span><span>
</span><span id="line-134"></span><span>        </span><span class="hs-comment">-- The FreeVarSet is the free variables of the binding.  In the case</span><span>
</span><span id="line-135"></span><span>        </span><span class="hs-comment">-- of recursive bindings, the set doesn't include the bound</span><span>
</span><span id="line-136"></span><span>        </span><span class="hs-comment">-- variables.</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-keyword">type</span><span> </span><span id="FloatInBinds"><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-var">FloatInBinds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBind"><span class="hs-identifier hs-type">FloatInBind</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-139"></span><span>        </span><span class="hs-comment">-- In reverse dependency order (innermost binder first)</span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-type">fiExpr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-142"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span>      </span><span class="hs-comment">-- Binds we're trying to drop</span><span>
</span><span id="line-143"></span><span>                            </span><span class="hs-comment">-- as far &quot;inwards&quot; as possible</span><span>
</span><span id="line-144"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs"><span class="hs-identifier hs-type">CoreExprWithFVs</span></a></span><span>   </span><span class="hs-comment">-- Input expr</span><span>
</span><span id="line-145"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>          </span><span class="hs-comment">-- Result</span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span id="fiExpr"><span class="annot"><span class="annottext">fiExpr :: Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var hs-var">fiExpr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680959774"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959774"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnLit"><span class="hs-identifier hs-type">AnnLit</span></a></span><span> </span><span id="local-6989586621680959772"><span class="annot"><span class="annottext">Literal
</span><a href="#local-6989586621680959772"><span class="hs-identifier hs-var">lit</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959774"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Literal -&gt; Expr CoreBndr
forall b. Literal -&gt; Expr b
</span><a href="GHC.Core.html#Lit"><span class="hs-identifier hs-var">Lit</span></a></span><span> </span><span class="annot"><span class="annottext">Literal
</span><a href="#local-6989586621680959772"><span class="hs-identifier hs-var">lit</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-148"></span><span>                                       </span><span class="hs-comment">-- See Note [Dead bindings]</span><span>
</span><span id="line-149"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680959769"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959769"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnType"><span class="hs-identifier hs-type">AnnType</span></a></span><span> </span><span id="local-6989586621680959767"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959767"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">null</span><span> </span><span class="hs-identifier">to_drop</span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-identifier">Type</span><span> </span><span class="hs-identifier">ty</span><span>
</span><span id="line-150"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680959760"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959760"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnVar"><span class="hs-identifier hs-type">AnnVar</span></a></span><span> </span><span id="local-6989586621680959758"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959758"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959760"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr -&gt; Expr CoreBndr
forall b. CoreBndr -&gt; Expr b
</span><a href="GHC.Core.html#Var"><span class="hs-identifier hs-var">Var</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959758"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680959756"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959756"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnCoercion"><span class="hs-identifier hs-type">AnnCoercion</span></a></span><span> </span><span id="local-6989586621680959754"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680959754"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959756"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Coercion -&gt; Expr CoreBndr
forall b. Coercion -&gt; Expr b
</span><a href="GHC.Core.html#Coercion"><span class="hs-identifier hs-var">Coercion</span></a></span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680959754"><span class="hs-identifier hs-var">co</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span id="local-6989586621680959752"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959752"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680959751"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959751"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnCast"><span class="hs-identifier hs-type">AnnCast</span></a></span><span> </span><span id="local-6989586621680959749"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959749"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959748"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959748"><span class="hs-identifier hs-var">co_ann</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959747"><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680959747"><span class="hs-identifier hs-var">co</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959746"><span class="hs-identifier hs-var">drop_here</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; FloatInBinds -&gt; FloatInBinds
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959745"><span class="hs-identifier hs-var">co_drop</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Expr CoreBndr -&gt; Expr CoreBndr) -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-154"></span><span>    </span><span class="annot"><span class="annottext">Expr CoreBndr -&gt; Coercion -&gt; Expr CoreBndr
forall b. Expr b -&gt; Coercion -&gt; Expr b
</span><a href="GHC.Core.html#Cast"><span class="hs-identifier hs-var">Cast</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959752"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959743"><span class="hs-identifier hs-var">e_drop</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959749"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Coercion
</span><a href="#local-6989586621680959747"><span class="hs-identifier hs-var">co</span></a></span><span>
</span><span id="line-155"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-156"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621680959746"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959746"><span class="hs-identifier hs-var">drop_here</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959743"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959743"><span class="hs-identifier hs-var">e_drop</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959745"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959745"><span class="hs-identifier hs-var">co_drop</span></a></span></span><span class="hs-special">]</span><span>
</span><span id="line-157"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool -&gt; [FVAnn] -&gt; FloatInBinds -&gt; [FloatInBinds]
</span><a href="GHC.Core.Opt.FloatIn.html#sepBindsByDropPoint"><span class="hs-identifier hs-var">sepBindsByDropPoint</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959752"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-158"></span><span>          </span><span class="hs-special">[</span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959749"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#freeVarsOfAnn"><span class="hs-identifier hs-var">freeVarsOfAnn</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959748"><span class="hs-identifier hs-var">co_ann</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-159"></span><span>          </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959751"><span class="hs-identifier hs-var">to_drop</span></a></span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span class="hs-comment">{-
Applications: we do float inside applications, mainly because we
need to get at all the arguments.  The next simplifier run will
pull out any silly ones.
-}</span><span>
</span><span id="line-166"></span><span>
</span><span id="line-167"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span id="local-6989586621680959739"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959739"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680959738"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959738"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span id="local-6989586621680959737"><span class="annot"><span class="annottext">ann_expr :: CoreExprWithFVs
</span><a href="#local-6989586621680959737"><span class="hs-identifier hs-var">ann_expr</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Core.html#AnnApp"><span class="hs-identifier hs-type">AnnApp</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959735"><span class="hs-identifier hs-var">drop_here</span></a></span><span> </span><span class="annot"><span class="annottext">(Expr CoreBndr -&gt; Expr CoreBndr) -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959734"><span class="hs-identifier hs-var">extra_drop</span></a></span><span> </span><span class="annot"><span class="annottext">(Expr CoreBndr -&gt; Expr CoreBndr) -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-169"></span><span>    </span><span class="annot"><span class="annottext">[Tickish CoreBndr] -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Utils.html#mkTicks"><span class="hs-identifier hs-var">mkTicks</span></a></span><span> </span><span class="annot"><span class="annottext">[Tickish CoreBndr]
</span><a href="#local-6989586621680959732"><span class="hs-identifier hs-var">ticks</span></a></span><span> </span><span class="annot"><span class="annottext">(Expr CoreBndr -&gt; Expr CoreBndr) -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-170"></span><span>    </span><span class="annot"><span class="annottext">Expr CoreBndr -&gt; [Expr CoreBndr] -&gt; Expr CoreBndr
forall b. Expr b -&gt; [Expr b] -&gt; Expr b
</span><a href="GHC.Core.html#mkApps"><span class="hs-identifier hs-var">mkApps</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959739"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959730"><span class="hs-identifier hs-var">fun_drop</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959729"><span class="hs-identifier hs-var">ann_fun</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-171"></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
-&gt; (FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr)
-&gt; [FloatInBinds]
-&gt; [CoreExprWithFVs]
-&gt; [Expr CoreBndr]
forall a b c. String -&gt; (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="GHC.Utils.Misc.html#zipWithEqual"><span class="hs-identifier hs-var">zipWithEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fiExpr&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959739"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FloatInBinds]
</span><a href="#local-6989586621680959727"><span class="hs-identifier hs-var">arg_drops</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExprWithFVs]
</span><a href="#local-6989586621680959726"><span class="hs-identifier hs-var">ann_args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-172"></span><span>           </span><span class="hs-comment">-- use zipWithEqual, we should have</span><span>
</span><span id="line-173"></span><span>           </span><span class="hs-comment">-- length ann_args = length arg_fvs = length arg_drops</span><span>
</span><span id="line-174"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-175"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680959729"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959729"><span class="hs-identifier hs-var">ann_fun</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959726"><span class="annot"><span class="annottext">[CoreExprWithFVs]
</span><a href="#local-6989586621680959726"><span class="hs-identifier hs-var">ann_args</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959732"><span class="annot"><span class="annottext">[Tickish CoreBndr]
</span><a href="#local-6989586621680959732"><span class="hs-identifier hs-var">ticks</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Tickish CoreBndr -&gt; Bool)
-&gt; CoreExprWithFVs
-&gt; (CoreExprWithFVs, [CoreExprWithFVs], [Tickish CoreBndr])
forall b a.
(Tickish CoreBndr -&gt; Bool)
-&gt; AnnExpr b a -&gt; (AnnExpr b a, [AnnExpr b a], [Tickish CoreBndr])
</span><a href="GHC.Core.html#collectAnnArgsTicks"><span class="hs-identifier hs-var">collectAnnArgsTicks</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish CoreBndr -&gt; Bool
forall id. Tickish id -&gt; Bool
</span><a href="GHC.Core.html#tickishFloatable"><span class="hs-identifier hs-var">tickishFloatable</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959737"><span class="hs-identifier hs-var">ann_expr</span></a></span><span>
</span><span id="line-176"></span><span>    </span><span id="local-6989586621680959723"><span class="annot"><span class="annottext">fun_ty :: Type
</span><a href="#local-6989586621680959723"><span class="hs-identifier hs-var hs-var">fun_ty</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr -&gt; Type
</span><a href="GHC.Core.Utils.html#exprType"><span class="hs-identifier hs-var">exprType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; Expr CoreBndr
forall bndr annot. AnnExpr bndr annot -&gt; Expr bndr
</span><a href="GHC.Core.html#deAnnotate"><span class="hs-identifier hs-var">deAnnotate</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959729"><span class="hs-identifier hs-var">ann_fun</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-177"></span><span>    </span><span id="local-6989586621680959720"><span class="annot"><span class="annottext">fun_fvs :: FVAnn
</span><a href="#local-6989586621680959720"><span class="hs-identifier hs-var hs-var">fun_fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959729"><span class="hs-identifier hs-var">ann_fun</span></a></span><span>
</span><span id="line-178"></span><span>    </span><span id="local-6989586621680959719"><span class="annot"><span class="annottext">arg_fvs :: [FVAnn]
</span><a href="#local-6989586621680959719"><span class="hs-identifier hs-var hs-var">arg_fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExprWithFVs -&gt; FVAnn) -&gt; [CoreExprWithFVs] -&gt; [FVAnn]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExprWithFVs]
</span><a href="#local-6989586621680959726"><span class="hs-identifier hs-var">ann_args</span></a></span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680959735"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959735"><span class="hs-identifier hs-var">drop_here</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680959734"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959734"><span class="hs-identifier hs-var">extra_drop</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680959730"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959730"><span class="hs-identifier hs-var">fun_drop</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680959727"><span class="annot"><span class="annottext">[FloatInBinds]
</span><a href="#local-6989586621680959727"><span class="hs-identifier hs-var">arg_drops</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-181"></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool -&gt; [FVAnn] -&gt; FloatInBinds -&gt; [FloatInBinds]
</span><a href="GHC.Core.Opt.FloatIn.html#sepBindsByDropPoint"><span class="hs-identifier hs-var">sepBindsByDropPoint</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959739"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-182"></span><span>                             </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959718"><span class="hs-identifier hs-var">extra_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; [FVAnn] -&gt; [FVAnn]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959720"><span class="hs-identifier hs-var">fun_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; [FVAnn] -&gt; [FVAnn]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[FVAnn]
</span><a href="#local-6989586621680959719"><span class="hs-identifier hs-var">arg_fvs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-183"></span><span>                             </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959738"><span class="hs-identifier hs-var">to_drop</span></a></span><span>
</span><span id="line-184"></span><span>         </span><span class="hs-comment">-- Shortcut behaviour: if to_drop is empty,</span><span>
</span><span id="line-185"></span><span>         </span><span class="hs-comment">-- sepBindsByDropPoint returns a suitable bunch of empty</span><span>
</span><span id="line-186"></span><span>         </span><span class="hs-comment">-- lists without evaluating extra_fvs, and hence without</span><span>
</span><span id="line-187"></span><span>         </span><span class="hs-comment">-- peering into each argument</span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959718"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959718"><span class="hs-identifier hs-var">extra_fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((Type, FVAnn) -&gt; CoreExprWithFVs -&gt; (Type, FVAnn))
-&gt; (Type, FVAnn) -&gt; [CoreExprWithFVs] -&gt; (Type, FVAnn)
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">(Type, FVAnn) -&gt; CoreExprWithFVs -&gt; (Type, FVAnn)
</span><a href="#local-6989586621680959715"><span class="hs-identifier hs-var">add_arg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959723"><span class="hs-identifier hs-var">fun_ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959714"><span class="hs-identifier hs-var">extra_fvs0</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[CoreExprWithFVs]
</span><a href="#local-6989586621680959726"><span class="hs-identifier hs-var">ann_args</span></a></span><span>
</span><span id="line-190"></span><span>    </span><span id="local-6989586621680959714"><span class="annot"><span class="annottext">extra_fvs0 :: FVAnn
</span><a href="#local-6989586621680959714"><span class="hs-identifier hs-var hs-var">extra_fvs0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959729"><span class="hs-identifier hs-var">ann_fun</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-191"></span><span>                   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnVar"><span class="hs-identifier hs-type">AnnVar</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959720"><span class="hs-identifier hs-var">fun_fvs</span></a></span><span>
</span><span id="line-192"></span><span>                   </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="GHC.Types.Var.Set.html#emptyDVarSet"><span class="hs-identifier hs-var">emptyDVarSet</span></a></span><span>
</span><span id="line-193"></span><span>          </span><span class="hs-comment">-- Don't float the binding for f into f x y z; see Note [Join points]</span><span>
</span><span id="line-194"></span><span>          </span><span class="hs-comment">-- for why we *can't* do it when f is a join point. (If f isn't a</span><span>
</span><span id="line-195"></span><span>          </span><span class="hs-comment">-- join point, floating it in isn't especially harmful but it's</span><span>
</span><span id="line-196"></span><span>          </span><span class="hs-comment">-- useless since the simplifier will immediately float it back out.)</span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span>    </span><span class="annot"><a href="#local-6989586621680959715"><span class="hs-identifier hs-type">add_arg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FreeVarSet"><span class="hs-identifier hs-type">FreeVarSet</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs"><span class="hs-identifier hs-type">CoreExprWithFVs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FreeVarSet"><span class="hs-identifier hs-type">FreeVarSet</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-199"></span><span>    </span><span id="local-6989586621680959715"><span class="annot"><span class="annottext">add_arg :: (Type, FVAnn) -&gt; CoreExprWithFVs -&gt; (Type, FVAnn)
</span><a href="#local-6989586621680959715"><span class="hs-identifier hs-var hs-var">add_arg</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959712"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959712"><span class="hs-identifier hs-var">fun_ty</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959711"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959711"><span class="hs-identifier hs-var">extra_fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnType"><span class="hs-identifier hs-type">AnnType</span></a></span><span> </span><span id="local-6989586621680959710"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959710"><span class="hs-identifier hs-var">ty</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-200"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Type -&gt; Type
Type -&gt; Type -&gt; Type
</span><a href="GHC.Core.Type.html#piResultTy"><span class="hs-identifier hs-var">piResultTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959712"><span class="hs-identifier hs-var">fun_ty</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959710"><span class="hs-identifier hs-var">ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959711"><span class="hs-identifier hs-var">extra_fvs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span>    </span><span class="annot"><a href="#local-6989586621680959715"><span class="hs-identifier hs-var">add_arg</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959708"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959708"><span class="hs-identifier hs-var">fun_ty</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959707"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959707"><span class="hs-identifier hs-var">extra_fvs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959706"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959706"><span class="hs-identifier hs-var">arg_fvs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959705"><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn
</span><a href="#local-6989586621680959705"><span class="hs-identifier hs-var">arg</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-203"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn -&gt; Type -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoArg"><span class="hs-identifier hs-var">noFloatIntoArg</span></a></span><span> </span><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn
</span><a href="#local-6989586621680959705"><span class="hs-identifier hs-var">arg</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959703"><span class="hs-identifier hs-var">arg_ty</span></a></span><span>
</span><span id="line-204"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959702"><span class="hs-identifier hs-var">res_ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959707"><span class="hs-identifier hs-var">extra_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSet"><span class="hs-operator hs-var">`unionDVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959706"><span class="hs-identifier hs-var">arg_fvs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-205"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-206"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959702"><span class="hs-identifier hs-var">res_ty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959707"><span class="hs-identifier hs-var">extra_fvs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-207"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-208"></span><span>       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959703"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959703"><span class="hs-identifier hs-var">arg_ty</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959702"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959702"><span class="hs-identifier hs-var">res_ty</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Type -&gt; (Type, Type, Type)
</span><a href="GHC.Core.Type.html#splitFunTy"><span class="hs-identifier hs-var">splitFunTy</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959708"><span class="hs-identifier hs-var">fun_ty</span></a></span><span>
</span><span id="line-209"></span><span>
</span><span id="line-210"></span><span class="hs-comment">{- Note [Dead bindings]
~~~~~~~~~~~~~~~~~~~~~~~
At a literal we won't usually have any floated bindings; the
only way that can happen is if the binding wrapped the literal
/in the original input program/.  e.g.
   case x of { DEFAULT -&gt; 1# }
But, while this may be unusual it is not actually wrong, and it did
once happen (#15696).

Note [Do not destroy the let/app invariant]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Watch out for
   f (x +# y)
We don't want to float bindings into here
   f (case ... of { x -&gt; x +# y })
because that might destroy the let/app invariant, which requires
unlifted function arguments to be ok-for-speculation.

Note [Join points]
~~~~~~~~~~~~~~~~~~
Generally, we don't need to worry about join points - there are places we're
not allowed to float them, but since they can't have occurrences in those
places, we're not tempted.

We do need to be careful about jumps, however:

  joinrec j x y z = ... in
  jump j a b c

Previous versions often floated the definition of a recursive function into its
only non-recursive occurrence. But for a join point, this is a disaster:

  (joinrec j x y z = ... in
  jump j) a b c -- wrong!

Every jump must be exact, so the jump to j must have three arguments. Hence
we're careful not to float into the target of a jump (though we can float into
the arguments just fine).

Note [Floating in past a lambda group]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* We must be careful about floating inside a value lambda.
  That risks losing laziness.
  The float-out pass might rescue us, but then again it might not.

* We must be careful about type lambdas too.  At one time we did, and
  there is no risk of duplicating work thereby, but we do need to be
  careful.  In particular, here is a bad case (it happened in the
  cichelli benchmark:
        let v = ...
        in let f = /\t -&gt; \a -&gt; ...
           ==&gt;
        let f = /\t -&gt; let v = ... in \a -&gt; ...
  This is bad as now f is an updatable closure (update PAP)
  and has arity 0.

* Hack alert!  We only float in through one-shot lambdas,
  not (as you might guess) through lone big lambdas.
  Reason: we float *out* past big lambdas (see the test in the Lam
  case of FloatOut.floatExpr) and we don't want to float straight
  back in again.

  It *is* important to float into one-shot lambdas, however;
  see the remarks with noFloatIntoRhs.

So we treat lambda in groups, using the following rule:

 Float in if (a) there is at least one Id,
         and (b) there are no non-one-shot Ids

 Otherwise drop all the bindings outside the group.

This is what the 'go' function in the AnnLam case is doing.

(Join points are handled similarly: a join point is considered one-shot iff
it's non-recursive, so we float only into non-recursive join points.)

Urk! if all are tyvars, and we don't float in, we may miss an
      opportunity to float inside a nested case branch


Note [Floating coercions]
~~~~~~~~~~~~~~~~~~~~~~~~~
We could, in principle, have a coercion binding like
   case f x of co { DEFAULT -&gt; e1 e2 }
It's not common to have a function that returns a coercion, but nothing
in Core prohibits it.  If so, 'co' might be mentioned in e1 or e2
/only in a type/.  E.g. suppose e1 was
  let (x :: Int |&gt; co) = blah in blah2


But, with coercions appearing in types, there is a complication: we
might be floating in a &quot;strict let&quot; -- that is, a case. Case expressions
mention their return type. We absolutely can't float a coercion binding
inward to the point that the type of the expression it's about to wrap
mentions the coercion. So we include the union of the sets of free variables
of the types of all the drop points involved. If any of the floaters
bind a coercion variable mentioned in any of the types, that binder must
be dropped right away.

-}</span><span>
</span><span id="line-311"></span><span>
</span><span id="line-312"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span id="local-6989586621680959699"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959699"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680959698"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959698"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span id="local-6989586621680959697"><span class="annot"><span class="annottext">lam :: CoreExprWithFVs
</span><a href="#local-6989586621680959697"><span class="hs-identifier hs-var">lam</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnLam"><span class="hs-identifier hs-type">AnnLam</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-313"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">[CoreBndr] -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoLam"><span class="hs-identifier hs-var">noFloatIntoLam</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959694"><span class="hs-identifier hs-var">bndrs</span></a></span><span>       </span><span class="hs-comment">-- Dump it all here</span><span>
</span><span id="line-314"></span><span>     </span><span class="hs-comment">-- NB: Must line up with noFloatIntoRhs (AnnLam...); see #7088</span><span>
</span><span id="line-315"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959698"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CoreBndr] -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959694"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959699"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959692"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>           </span><span class="hs-comment">-- Float inside</span><span>
</span><span id="line-318"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[CoreBndr] -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959694"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959699"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959698"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959692"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-319"></span><span>
</span><span id="line-320"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-321"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680959694"><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959694"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959692"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959692"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; ([CoreBndr], CoreExprWithFVs)
forall bndr annot.
AnnExpr bndr annot -&gt; ([bndr], AnnExpr bndr annot)
</span><a href="GHC.Core.html#collectAnnBndrs"><span class="hs-identifier hs-var">collectAnnBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959697"><span class="hs-identifier hs-var">lam</span></a></span><span>
</span><span id="line-322"></span><span>
</span><span id="line-323"></span><span class="hs-comment">{-
We don't float lets inwards past an SCC.
        ToDo: keep info on current cc, and when passing
        one, if it is not the same, annotate all lets in binds with current
        cc, change current cc to the new one and float binds into expr.
-}</span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span id="local-6989586621680959690"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959690"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680959689"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959689"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnTick"><span class="hs-identifier hs-type">AnnTick</span></a></span><span> </span><span id="local-6989586621680959687"><span class="annot"><span class="annottext">Tickish CoreBndr
</span><a href="#local-6989586621680959687"><span class="hs-identifier hs-var">tickish</span></a></span></span><span> </span><span id="local-6989586621680959686"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959686"><span class="hs-identifier hs-var">expr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-331"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Tickish CoreBndr
</span><a href="#local-6989586621680959687"><span class="hs-identifier hs-var">tickish</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish CoreBndr -&gt; TickishScoping -&gt; Bool
forall id. Tickish id -&gt; TickishScoping -&gt; Bool
</span><a href="GHC.Core.html#tickishScopesLike"><span class="hs-operator hs-var">`tickishScopesLike`</span></a></span><span> </span><span class="annot"><span class="annottext">TickishScoping
</span><a href="GHC.Core.html#SoftScope"><span class="hs-identifier hs-var">SoftScope</span></a></span><span>
</span><span id="line-332"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Tickish CoreBndr -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall b. Tickish CoreBndr -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Tick"><span class="hs-identifier hs-var">Tick</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish CoreBndr
</span><a href="#local-6989586621680959687"><span class="hs-identifier hs-var">tickish</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959690"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959689"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959686"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-333"></span><span>
</span><span id="line-334"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-comment">-- Wimp out for now - we could push values in</span><span>
</span><span id="line-335"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959689"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Tickish CoreBndr -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall b. Tickish CoreBndr -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#Tick"><span class="hs-identifier hs-var">Tick</span></a></span><span> </span><span class="annot"><span class="annottext">Tickish CoreBndr
</span><a href="#local-6989586621680959687"><span class="hs-identifier hs-var">tickish</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959690"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959686"><span class="hs-identifier hs-var">expr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-336"></span><span>
</span><span id="line-337"></span><span class="hs-comment">{-
For @Lets@, the possible ``drop points'' for the \tr{to_drop}
bindings are: (a)~in the body, (b1)~in the RHS of a NonRec binding,
or~(b2), in each of the RHSs of the pairs of a @Rec@.

Note that we do {\em weird things} with this let's binding.  Consider:
\begin{verbatim}
let
    w = ...
in {
    let v = ... w ...
    in ... v .. w ...
}
\end{verbatim}
Look at the inner \tr{let}.  As \tr{w} is used in both the bind and
body of the inner let, we could panic and leave \tr{w}'s binding where
it is.  But \tr{v} is floatable further into the body of the inner let, and
{\em then} \tr{w} will also be only in the body of that inner let.

So: rather than drop \tr{w}'s binding here, we add it onto the list of
things to drop in the outer let's body, and let nature take its
course.

Note [extra_fvs (1): avoid floating into RHS]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider let x=\y....t... in body.  We do not necessarily want to float
a binding for t into the RHS, because it'll immediately be floated out
again.  (It won't go inside the lambda else we risk losing work.)
In letrec, we need to be more careful still. We don't want to transform
        let x# = y# +# 1#
        in
        letrec f = \z. ...x#...f...
        in ...
into
        letrec f = let x# = y# +# 1# in \z. ...x#...f... in ...
because now we can't float the let out again, because a letrec
can't have unboxed bindings.

So we make &quot;extra_fvs&quot; which is the rhs_fvs of such bindings, and
arrange to dump bindings that bind extra_fvs before the entire let.

Note [extra_fvs (2): free variables of rules]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider
  let x{rule mentioning y} = rhs in body
Here y is not free in rhs or body; but we still want to dump bindings
that bind y outside the let.  So we augment extra_fvs with the
idRuleAndUnfoldingVars of x.  No need for type variables, hence not using
idFreeVars.
-}</span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span id="local-6989586621680959682"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959682"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680959681"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959681"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span class="annot"><a href="GHC.Core.html#AnnLet"><span class="hs-identifier hs-type">AnnLet</span></a></span><span> </span><span id="local-6989586621680959679"><span class="annot"><span class="annottext">AnnBind CoreBndr FVAnn
</span><a href="#local-6989586621680959679"><span class="hs-identifier hs-var">bind</span></a></span></span><span> </span><span id="local-6989586621680959678"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959678"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-389"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959682"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959677"><span class="hs-identifier hs-var">after</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; FloatInBinds -&gt; FloatInBinds
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBind
</span><a href="#local-6989586621680959676"><span class="hs-identifier hs-var">new_float</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBind -&gt; FloatInBinds -&gt; FloatInBinds
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959675"><span class="hs-identifier hs-var">before</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959678"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-390"></span><span>           </span><span class="hs-comment">-- to_drop is in reverse dependency order</span><span>
</span><span id="line-391"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-392"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680959675"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959675"><span class="hs-identifier hs-var">before</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959676"><span class="annot"><span class="annottext">FloatInBind
</span><a href="#local-6989586621680959676"><span class="hs-identifier hs-var">new_float</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959677"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959677"><span class="hs-identifier hs-var">after</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform
-&gt; FloatInBinds
-&gt; AnnBind CoreBndr FVAnn
-&gt; FVAnn
-&gt; (FloatInBinds, FloatInBind, FloatInBinds)
</span><a href="GHC.Core.Opt.FloatIn.html#fiBind"><span class="hs-identifier hs-var">fiBind</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959682"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959681"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="annot"><span class="annottext">AnnBind CoreBndr FVAnn
</span><a href="#local-6989586621680959679"><span class="hs-identifier hs-var">bind</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959673"><span class="hs-identifier hs-var">body_fvs</span></a></span><span>
</span><span id="line-393"></span><span>    </span><span id="local-6989586621680959673"><span class="annot"><span class="annottext">body_fvs :: FVAnn
</span><a href="#local-6989586621680959673"><span class="hs-identifier hs-var hs-var">body_fvs</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959678"><span class="hs-identifier hs-var">body</span></a></span><span>
</span><span id="line-394"></span><span>
</span><span id="line-395"></span><span class="hs-comment">{- Note [Floating primops]
~~~~~~~~~~~~~~~~~~~~~~~~~~
We try to float-in a case expression over an unlifted type.  The
motivating example was #5658: in particular, this change allows
array indexing operations, which have a single DEFAULT alternative
without any binders, to be floated inward.

SIMD primops for unpacking SIMD vectors into an unboxed tuple of unboxed
scalars also need to be floated inward, but unpacks have a single non-DEFAULT
alternative that binds the elements of the tuple. We now therefore also support
floating in cases with a single alternative that may bind values.

But there are wrinkles

* Which unlifted cases do we float?
  See Note [PrimOp can_fail and has_side_effects] in GHC.Builtin.PrimOps which
  explains:
   - We can float in can_fail primops (which concerns imprecise exceptions),
     but we can't float them out.
   - But we can float a has_side_effects primop, but NOT inside a lambda,
     so for now we don't float them at all. Hence exprOkForSideEffects.
   - Throwing precise exceptions is a special case of the previous point: We
     may /never/ float in a call to (something that ultimately calls)
     'raiseIO#'.
     See Note [Precise exceptions and strictness analysis] in GHC.Types.Demand.

* Because we can float can-fail primops (array indexing, division) inwards
  but not outwards, we must be careful not to transform
     case a /# b of r -&gt; f (F# r)
  ===&gt;
    f (case a /# b of r -&gt; F# r)
  because that creates a new thunk that wasn't there before.  And
  because it can't be floated out (can_fail), the thunk will stay
  there.  Disaster!  (This happened in nofib 'simple' and 'scs'.)

  Solution: only float cases into the branches of other cases, and
  not into the arguments of an application, or the RHS of a let. This
  is somewhat conservative, but it's simple.  And it still hits the
  cases like #5658.   This is implemented in sepBindsByJoinPoint;
  if is_case is False we dump all floating cases right here.

* #14511 is another example of why we want to restrict float-in
  of case-expressions.  Consider
     case indexArray# a n of (# r #) -&gt; writeArray# ma i (f r)
  Now, floating that indexing operation into the (f r) thunk will
  not create any new thunks, but it will keep the array 'a' alive
  for much longer than the programmer expected.

  So again, not floating a case into a let or argument seems like
  the Right Thing

For @Case@, the possible drop points for the 'to_drop'
bindings are:
  (a) inside the scrutinee
  (b) inside one of the alternatives/default (default FVs always /first/!).

-}</span><span>
</span><span id="line-452"></span><span>
</span><span id="line-453"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span id="local-6989586621680959672"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959672"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680959671"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959671"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnCase"><span class="hs-identifier hs-type">AnnCase</span></a></span><span> </span><span id="local-6989586621680959669"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959669"><span class="hs-identifier hs-var">scrut</span></a></span></span><span> </span><span id="local-6989586621680959668"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959668"><span class="hs-identifier hs-var">case_bndr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Type
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span id="local-6989586621680959667"><span class="annot"><span class="annottext">AltCon
</span><a href="#local-6989586621680959667"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680959666"><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959666"><span class="hs-identifier hs-var">alt_bndrs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680959665"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959665"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-454"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Bool
Type -&gt; Bool
</span><a href="GHC.Core.Type.html#isUnliftedType"><span class="hs-identifier hs-var">isUnliftedType</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959668"><span class="hs-identifier hs-var">case_bndr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-455"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr -&gt; Bool
</span><a href="GHC.Core.Utils.html#exprOkForSideEffects"><span class="hs-identifier hs-var">exprOkForSideEffects</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; Expr CoreBndr
forall bndr annot. AnnExpr bndr annot -&gt; Expr bndr
</span><a href="GHC.Core.html#deAnnotate"><span class="hs-identifier hs-var">deAnnotate</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959669"><span class="hs-identifier hs-var">scrut</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-456"></span><span>      </span><span class="hs-comment">-- See Note [Floating primops]</span><span>
</span><span id="line-457"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959662"><span class="hs-identifier hs-var">shared_binds</span></a></span><span> </span><span class="annot"><span class="annottext">(Expr CoreBndr -&gt; Expr CoreBndr) -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-458"></span><span>    </span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959672"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FloatInBind
</span><a href="#local-6989586621680959661"><span class="hs-identifier hs-var">case_float</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBind -&gt; FloatInBinds -&gt; FloatInBinds
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959660"><span class="hs-identifier hs-var">rhs_binds</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959665"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-459"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-460"></span><span>    </span><span id="local-6989586621680959661"><span class="annot"><span class="annottext">case_float :: FloatInBind
</span><a href="#local-6989586621680959661"><span class="hs-identifier hs-var hs-var">case_float</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; FloatBind -&gt; FloatInBind
</span><a href="GHC.Core.Opt.FloatIn.html#FB"><span class="hs-identifier hs-var">FB</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CoreBndr] -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#mkDVarSet"><span class="hs-identifier hs-var">mkDVarSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959668"><span class="hs-identifier hs-var">case_bndr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr -&gt; [CoreBndr] -&gt; [CoreBndr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959666"><span class="hs-identifier hs-var">alt_bndrs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959658"><span class="hs-identifier hs-var">scrut_fvs</span></a></span><span>
</span><span id="line-461"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Expr CoreBndr -&gt; CoreBndr -&gt; AltCon -&gt; [CoreBndr] -&gt; FloatBind
</span><a href="GHC.Core.Make.html#FloatCase"><span class="hs-identifier hs-var">FloatCase</span></a></span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959656"><span class="hs-identifier hs-var">scrut'</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959668"><span class="hs-identifier hs-var">case_bndr</span></a></span><span> </span><span class="annot"><span class="annottext">AltCon
</span><a href="#local-6989586621680959667"><span class="hs-identifier hs-var">con</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959666"><span class="hs-identifier hs-var">alt_bndrs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-462"></span><span>    </span><span id="local-6989586621680959656"><span class="annot"><span class="annottext">scrut' :: Expr CoreBndr
</span><a href="#local-6989586621680959656"><span class="hs-identifier hs-var hs-var">scrut'</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959672"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959655"><span class="hs-identifier hs-var">scrut_binds</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959669"><span class="hs-identifier hs-var">scrut</span></a></span><span>
</span><span id="line-463"></span><span>    </span><span id="local-6989586621680959654"><span class="annot"><span class="annottext">rhs_fvs :: FVAnn
</span><a href="#local-6989586621680959654"><span class="hs-identifier hs-var hs-var">rhs_fvs</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959665"><span class="hs-identifier hs-var">rhs</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; [CoreBndr] -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#delDVarSetList"><span class="hs-operator hs-var">`delDVarSetList`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959668"><span class="hs-identifier hs-var">case_bndr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr -&gt; [CoreBndr] -&gt; [CoreBndr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959666"><span class="hs-identifier hs-var">alt_bndrs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-464"></span><span>    </span><span id="local-6989586621680959658"><span class="annot"><span class="annottext">scrut_fvs :: FVAnn
</span><a href="#local-6989586621680959658"><span class="hs-identifier hs-var hs-var">scrut_fvs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959669"><span class="hs-identifier hs-var">scrut</span></a></span><span>
</span><span id="line-465"></span><span>
</span><span id="line-466"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621680959662"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959662"><span class="hs-identifier hs-var">shared_binds</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959655"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959655"><span class="hs-identifier hs-var">scrut_binds</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959660"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959660"><span class="hs-identifier hs-var">rhs_binds</span></a></span></span><span class="hs-special">]</span><span>
</span><span id="line-467"></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool -&gt; [FVAnn] -&gt; FloatInBinds -&gt; [FloatInBinds]
</span><a href="GHC.Core.Opt.FloatIn.html#sepBindsByDropPoint"><span class="hs-identifier hs-var">sepBindsByDropPoint</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959672"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-468"></span><span>           </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959658"><span class="hs-identifier hs-var">scrut_fvs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959654"><span class="hs-identifier hs-var">rhs_fvs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-469"></span><span>           </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959671"><span class="hs-identifier hs-var">to_drop</span></a></span><span>
</span><span id="line-470"></span><span>
</span><span id="line-471"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span id="local-6989586621680959652"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959652"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680959651"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959651"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnCase"><span class="hs-identifier hs-type">AnnCase</span></a></span><span> </span><span id="local-6989586621680959650"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959650"><span class="hs-identifier hs-var">scrut</span></a></span></span><span> </span><span id="local-6989586621680959649"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959649"><span class="hs-identifier hs-var">case_bndr</span></a></span></span><span> </span><span id="local-6989586621680959648"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959648"><span class="hs-identifier hs-var">ty</span></a></span></span><span> </span><span id="local-6989586621680959647"><span class="annot"><span class="annottext">[AnnAlt CoreBndr FVAnn]
</span><a href="#local-6989586621680959647"><span class="hs-identifier hs-var">alts</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-472"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959646"><span class="hs-identifier hs-var">drop_here1</span></a></span><span> </span><span class="annot"><span class="annottext">(Expr CoreBndr -&gt; Expr CoreBndr) -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-473"></span><span>    </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959645"><span class="hs-identifier hs-var">drop_here2</span></a></span><span> </span><span class="annot"><span class="annottext">(Expr CoreBndr -&gt; Expr CoreBndr) -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-474"></span><span>    </span><span class="annot"><span class="annottext">Expr CoreBndr
-&gt; CoreBndr -&gt; Type -&gt; [Alt CoreBndr] -&gt; Expr CoreBndr
forall b. Expr b -&gt; b -&gt; Type -&gt; [Alt b] -&gt; Expr b
</span><a href="GHC.Core.html#Case"><span class="hs-identifier hs-var">Case</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959652"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959643"><span class="hs-identifier hs-var">scrut_drops</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959650"><span class="hs-identifier hs-var">scrut</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959649"><span class="hs-identifier hs-var">case_bndr</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959648"><span class="hs-identifier hs-var">ty</span></a></span><span>
</span><span id="line-475"></span><span>         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
-&gt; (FloatInBinds -&gt; AnnAlt CoreBndr FVAnn -&gt; Alt CoreBndr)
-&gt; [FloatInBinds]
-&gt; [AnnAlt CoreBndr FVAnn]
-&gt; [Alt CoreBndr]
forall a b c. String -&gt; (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="GHC.Utils.Misc.html#zipWithEqual"><span class="hs-identifier hs-var">zipWithEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fiExpr&quot;</span></span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; AnnAlt CoreBndr FVAnn -&gt; Alt CoreBndr
forall {a} {b}.
FloatInBinds -&gt; (a, b, CoreExprWithFVs) -&gt; (a, b, Expr CoreBndr)
</span><a href="#local-6989586621680959642"><span class="hs-identifier hs-var">fi_alt</span></a></span><span> </span><span class="annot"><span class="annottext">[FloatInBinds]
</span><a href="#local-6989586621680959641"><span class="hs-identifier hs-var">alts_drops_s</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnAlt CoreBndr FVAnn]
</span><a href="#local-6989586621680959647"><span class="hs-identifier hs-var">alts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-476"></span><span>         </span><span class="hs-comment">-- use zipWithEqual, we should have length alts_drops_s = length alts</span><span>
</span><span id="line-477"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-478"></span><span>        </span><span class="hs-comment">-- Float into the scrut and alts-considered-together just like App</span><span>
</span><span id="line-479"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621680959646"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959646"><span class="hs-identifier hs-var">drop_here1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959643"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959643"><span class="hs-identifier hs-var">scrut_drops</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959640"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959640"><span class="hs-identifier hs-var">alts_drops</span></a></span></span><span class="hs-special">]</span><span>
</span><span id="line-480"></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool -&gt; [FVAnn] -&gt; FloatInBinds -&gt; [FloatInBinds]
</span><a href="GHC.Core.Opt.FloatIn.html#sepBindsByDropPoint"><span class="hs-identifier hs-var">sepBindsByDropPoint</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959652"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-481"></span><span>           </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959639"><span class="hs-identifier hs-var">scrut_fvs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959638"><span class="hs-identifier hs-var">all_alts_fvs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-482"></span><span>           </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959651"><span class="hs-identifier hs-var">to_drop</span></a></span><span>
</span><span id="line-483"></span><span>
</span><span id="line-484"></span><span>        </span><span class="hs-comment">-- Float into the alts with the is_case flag set</span><span>
</span><span id="line-485"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680959645"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959645"><span class="hs-identifier hs-var">drop_here2</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680959641"><span class="annot"><span class="annottext">[FloatInBinds]
</span><a href="#local-6989586621680959641"><span class="hs-identifier hs-var">alts_drops_s</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-486"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">AnnAlt CoreBndr FVAnn
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">]</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[AnnAlt CoreBndr FVAnn]
</span><a href="#local-6989586621680959647"><span class="hs-identifier hs-var">alts</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; [FloatInBinds] -&gt; [FloatInBinds]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959640"><span class="hs-identifier hs-var">alts_drops</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-487"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool -&gt; [FVAnn] -&gt; FloatInBinds -&gt; [FloatInBinds]
</span><a href="GHC.Core.Opt.FloatIn.html#sepBindsByDropPoint"><span class="hs-identifier hs-var">sepBindsByDropPoint</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959652"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span> </span><span class="annot"><span class="annottext">[FVAnn]
</span><a href="#local-6989586621680959637"><span class="hs-identifier hs-var">alts_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959640"><span class="hs-identifier hs-var">alts_drops</span></a></span><span>
</span><span id="line-488"></span><span>
</span><span id="line-489"></span><span>    </span><span id="local-6989586621680959639"><span class="annot"><span class="annottext">scrut_fvs :: FVAnn
</span><a href="#local-6989586621680959639"><span class="hs-identifier hs-var hs-var">scrut_fvs</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959650"><span class="hs-identifier hs-var">scrut</span></a></span><span>
</span><span id="line-490"></span><span>    </span><span id="local-6989586621680959637"><span class="annot"><span class="annottext">alts_fvs :: [FVAnn]
</span><a href="#local-6989586621680959637"><span class="hs-identifier hs-var hs-var">alts_fvs</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(AnnAlt CoreBndr FVAnn -&gt; FVAnn)
-&gt; [AnnAlt CoreBndr FVAnn] -&gt; [FVAnn]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">AnnAlt CoreBndr FVAnn -&gt; FVAnn
forall {a}. (a, [CoreBndr], CoreExprWithFVs) -&gt; FVAnn
</span><a href="#local-6989586621680959636"><span class="hs-identifier hs-var">alt_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">[AnnAlt CoreBndr FVAnn]
</span><a href="#local-6989586621680959647"><span class="hs-identifier hs-var">alts</span></a></span><span>
</span><span id="line-491"></span><span>    </span><span id="local-6989586621680959638"><span class="annot"><span class="annottext">all_alts_fvs :: FVAnn
</span><a href="#local-6989586621680959638"><span class="hs-identifier hs-var hs-var">all_alts_fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FVAnn] -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSets"><span class="hs-identifier hs-var">unionDVarSets</span></a></span><span> </span><span class="annot"><span class="annottext">[FVAnn]
</span><a href="#local-6989586621680959637"><span class="hs-identifier hs-var">alts_fvs</span></a></span><span>
</span><span id="line-492"></span><span>    </span><span id="local-6989586621680959636"><span class="annot"><span class="annottext">alt_fvs :: (a, [CoreBndr], CoreExprWithFVs) -&gt; FVAnn
</span><a href="#local-6989586621680959636"><span class="hs-identifier hs-var hs-var">alt_fvs</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959633"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680959633"><span class="hs-identifier hs-var">_con</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959632"><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959632"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959631"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959631"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-493"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FVAnn -&gt; CoreBndr -&gt; FVAnn) -&gt; FVAnn -&gt; [CoreBndr] -&gt; FVAnn
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; CoreBndr -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#delDVarSet"><span class="hs-identifier hs-var">delDVarSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959631"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959649"><span class="hs-identifier hs-var">case_bndr</span></a></span><span class="annot"><span class="annottext">CoreBndr -&gt; [CoreBndr] -&gt; [CoreBndr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959632"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-494"></span><span>           </span><span class="hs-comment">-- Delete case_bndr and args from free vars of rhs</span><span>
</span><span id="line-495"></span><span>           </span><span class="hs-comment">-- to get free vars of alt</span><span>
</span><span id="line-496"></span><span>
</span><span id="line-497"></span><span>    </span><span id="local-6989586621680959642"><span class="annot"><span class="annottext">fi_alt :: FloatInBinds -&gt; (a, b, CoreExprWithFVs) -&gt; (a, b, Expr CoreBndr)
</span><a href="#local-6989586621680959642"><span class="hs-identifier hs-var hs-var">fi_alt</span></a></span></span><span> </span><span id="local-6989586621680959629"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959629"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959628"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680959628"><span class="hs-identifier hs-var">con</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959627"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680959627"><span class="hs-identifier hs-var">args</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959626"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959626"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621680959628"><span class="hs-identifier hs-var">con</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621680959627"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959652"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959629"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959626"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-498"></span><span>
</span><span id="line-499"></span><span class="hs-comment">------------------</span><span>
</span><span id="line-500"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiBind"><span class="hs-identifier hs-type">fiBind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-501"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span>      </span><span class="hs-comment">-- Binds we're trying to drop</span><span>
</span><span id="line-502"></span><span>                            </span><span class="hs-comment">-- as far &quot;inwards&quot; as possible</span><span>
</span><span id="line-503"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#CoreBindWithFVs"><span class="hs-identifier hs-type">CoreBindWithFVs</span></a></span><span>   </span><span class="hs-comment">-- Input binding</span><span>
</span><span id="line-504"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>           </span><span class="hs-comment">-- Free in scope of binding</span><span>
</span><span id="line-505"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span>    </span><span class="hs-comment">-- Land these before</span><span>
</span><span id="line-506"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBind"><span class="hs-identifier hs-type">FloatInBind</span></a></span><span>     </span><span class="hs-comment">-- The binding itself</span><span>
</span><span id="line-507"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span class="hs-special">)</span><span>   </span><span class="hs-comment">-- Land these after</span><span>
</span><span id="line-508"></span><span>
</span><span id="line-509"></span><span id="fiBind"><span class="annot"><span class="annottext">fiBind :: Platform
-&gt; FloatInBinds
-&gt; AnnBind CoreBndr FVAnn
-&gt; FVAnn
-&gt; (FloatInBinds, FloatInBind, FloatInBinds)
</span><a href="GHC.Core.Opt.FloatIn.html#fiBind"><span class="hs-identifier hs-var hs-var">fiBind</span></a></span></span><span> </span><span id="local-6989586621680959623"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959623"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680959622"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959622"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#AnnNonRec"><span class="hs-identifier hs-type">AnnNonRec</span></a></span><span> </span><span id="local-6989586621680959620"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959620"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621680959619"><span class="annot"><span class="annottext">ann_rhs :: CoreExprWithFVs
</span><a href="#local-6989586621680959619"><span class="hs-identifier hs-var">ann_rhs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621680959618"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959618"><span class="hs-identifier hs-var">rhs_fvs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959617"><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn
</span><a href="#local-6989586621680959617"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span id="local-6989586621680959616"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959616"><span class="hs-identifier hs-var">body_fvs</span></a></span></span><span>
</span><span id="line-510"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959615"><span class="hs-identifier hs-var">extra_binds</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; FloatInBinds -&gt; FloatInBinds
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959614"><span class="hs-identifier hs-var">shared_binds</span></a></span><span>          </span><span class="hs-comment">-- Land these before</span><span>
</span><span id="line-511"></span><span>                                           </span><span class="hs-comment">-- See Note [extra_fvs (1,2)]</span><span>
</span><span id="line-512"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; FloatBind -&gt; FloatInBind
</span><a href="GHC.Core.Opt.FloatIn.html#FB"><span class="hs-identifier hs-var">FB</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unitDVarSet"><span class="hs-identifier hs-var">unitDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959620"><span class="hs-identifier hs-var">id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959612"><span class="hs-identifier hs-var">rhs_fvs'</span></a></span><span>         </span><span class="hs-comment">-- The new binding itself</span><span>
</span><span id="line-513"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bind CoreBndr -&gt; FloatBind
</span><a href="GHC.Core.Make.html#FloatLet"><span class="hs-identifier hs-var">FloatLet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr -&gt; Expr CoreBndr -&gt; Bind CoreBndr
forall b. b -&gt; Expr b -&gt; Bind b
</span><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-var">NonRec</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959620"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959610"><span class="hs-identifier hs-var">rhs'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-514"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959609"><span class="hs-identifier hs-var">body_binds</span></a></span><span> </span><span class="hs-special">)</span><span>                         </span><span class="hs-comment">-- Land these after</span><span>
</span><span id="line-515"></span><span>
</span><span id="line-516"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-517"></span><span>    </span><span id="local-6989586621680959608"><span class="annot"><span class="annottext">body_fvs2 :: FVAnn
</span><a href="#local-6989586621680959608"><span class="hs-identifier hs-var hs-var">body_fvs2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959616"><span class="hs-identifier hs-var">body_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; CoreBndr -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#delDVarSet"><span class="hs-operator hs-var">`delDVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959620"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-518"></span><span>
</span><span id="line-519"></span><span>    </span><span id="local-6989586621680959607"><span class="annot"><span class="annottext">rule_fvs :: FVAnn
</span><a href="#local-6989586621680959607"><span class="hs-identifier hs-var hs-var">rule_fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreBndr -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingVarsDSet"><span class="hs-identifier hs-var">bndrRuleAndUnfoldingVarsDSet</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959620"><span class="hs-identifier hs-var">id</span></a></span><span>        </span><span class="hs-comment">-- See Note [extra_fvs (2): free variables of rules]</span><span>
</span><span id="line-520"></span><span>    </span><span id="local-6989586621680959605"><span class="annot"><span class="annottext">extra_fvs :: FVAnn
</span><a href="#local-6989586621680959605"><span class="hs-identifier hs-var hs-var">extra_fvs</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RecFlag -&gt; CoreBndr -&gt; AnnExpr' CoreBndr FVAnn -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoRhs"><span class="hs-identifier hs-var">noFloatIntoRhs</span></a></span><span> </span><span class="annot"><span class="annottext">RecFlag
</span><a href="GHC.Types.Basic.html#NonRecursive"><span class="hs-identifier hs-var">NonRecursive</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959620"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn
</span><a href="#local-6989586621680959617"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-521"></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959607"><span class="hs-identifier hs-var">rule_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSet"><span class="hs-operator hs-var">`unionDVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959618"><span class="hs-identifier hs-var">rhs_fvs</span></a></span><span>
</span><span id="line-522"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-523"></span><span>              </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959607"><span class="hs-identifier hs-var">rule_fvs</span></a></span><span>
</span><span id="line-524"></span><span>        </span><span class="hs-comment">-- See Note [extra_fvs (1): avoid floating into RHS]</span><span>
</span><span id="line-525"></span><span>        </span><span class="hs-comment">-- No point in floating in only to float straight out again</span><span>
</span><span id="line-526"></span><span>        </span><span class="hs-comment">-- We *can't* float into ok-for-speculation unlifted RHSs</span><span>
</span><span id="line-527"></span><span>        </span><span class="hs-comment">-- But do float into join points</span><span>
</span><span id="line-528"></span><span>
</span><span id="line-529"></span><span>    </span><span class="hs-special">[</span><span id="local-6989586621680959614"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959614"><span class="hs-identifier hs-var">shared_binds</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959615"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959615"><span class="hs-identifier hs-var">extra_binds</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959602"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959602"><span class="hs-identifier hs-var">rhs_binds</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959609"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959609"><span class="hs-identifier hs-var">body_binds</span></a></span></span><span class="hs-special">]</span><span>
</span><span id="line-530"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool -&gt; [FVAnn] -&gt; FloatInBinds -&gt; [FloatInBinds]
</span><a href="GHC.Core.Opt.FloatIn.html#sepBindsByDropPoint"><span class="hs-identifier hs-var">sepBindsByDropPoint</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959623"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-531"></span><span>            </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959605"><span class="hs-identifier hs-var">extra_fvs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959618"><span class="hs-identifier hs-var">rhs_fvs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959608"><span class="hs-identifier hs-var">body_fvs2</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-532"></span><span>            </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959622"><span class="hs-identifier hs-var">to_drop</span></a></span><span>
</span><span id="line-533"></span><span>
</span><span id="line-534"></span><span>        </span><span class="hs-comment">-- Push rhs_binds into the right hand side of the binding</span><span>
</span><span id="line-535"></span><span>    </span><span id="local-6989586621680959610"><span class="annot"><span class="annottext">rhs' :: Expr CoreBndr
</span><a href="#local-6989586621680959610"><span class="hs-identifier hs-var hs-var">rhs'</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform
-&gt; FloatInBinds -&gt; CoreBndr -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiRhs"><span class="hs-identifier hs-var">fiRhs</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959623"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959602"><span class="hs-identifier hs-var">rhs_binds</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959620"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959619"><span class="hs-identifier hs-var">ann_rhs</span></a></span><span>
</span><span id="line-536"></span><span>    </span><span id="local-6989586621680959612"><span class="annot"><span class="annottext">rhs_fvs' :: FVAnn
</span><a href="#local-6989586621680959612"><span class="hs-identifier hs-var hs-var">rhs_fvs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959618"><span class="hs-identifier hs-var">rhs_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSet"><span class="hs-operator hs-var">`unionDVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; FVAnn
</span><a href="GHC.Core.Opt.FloatIn.html#floatedBindsFVs"><span class="hs-identifier hs-var">floatedBindsFVs</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959602"><span class="hs-identifier hs-var">rhs_binds</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSet"><span class="hs-operator hs-var">`unionDVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959607"><span class="hs-identifier hs-var">rule_fvs</span></a></span><span>
</span><span id="line-537"></span><span>                        </span><span class="hs-comment">-- Don't forget the rule_fvs; the binding mentions them!</span><span>
</span><span id="line-538"></span><span>
</span><span id="line-539"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiBind"><span class="hs-identifier hs-var">fiBind</span></a></span><span> </span><span id="local-6989586621680959599"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959599"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680959598"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959598"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#AnnRec"><span class="hs-identifier hs-type">AnnRec</span></a></span><span> </span><span id="local-6989586621680959596"><span class="annot"><span class="annottext">[(CoreBndr, CoreExprWithFVs)]
</span><a href="#local-6989586621680959596"><span class="hs-identifier hs-var">bindings</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680959595"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959595"><span class="hs-identifier hs-var">body_fvs</span></a></span></span><span>
</span><span id="line-540"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959594"><span class="hs-identifier hs-var">extra_binds</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; FloatInBinds -&gt; FloatInBinds
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959593"><span class="hs-identifier hs-var">shared_binds</span></a></span><span>
</span><span id="line-541"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; FloatBind -&gt; FloatInBind
</span><a href="GHC.Core.Opt.FloatIn.html#FB"><span class="hs-identifier hs-var">FB</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[CoreBndr] -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#mkDVarSet"><span class="hs-identifier hs-var">mkDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959592"><span class="hs-identifier hs-var">ids</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959591"><span class="hs-identifier hs-var">rhs_fvs'</span></a></span><span>
</span><span id="line-542"></span><span>         </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bind CoreBndr -&gt; FloatBind
</span><a href="GHC.Core.Make.html#FloatLet"><span class="hs-identifier hs-var">FloatLet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[(CoreBndr, Expr CoreBndr)] -&gt; Bind CoreBndr
forall b. [(b, Expr b)] -&gt; Bind b
</span><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-var">Rec</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FloatInBinds]
-&gt; [(CoreBndr, CoreExprWithFVs)] -&gt; [(CoreBndr, Expr CoreBndr)]
</span><a href="#local-6989586621680959590"><span class="hs-identifier hs-var">fi_bind</span></a></span><span> </span><span class="annot"><span class="annottext">[FloatInBinds]
</span><a href="#local-6989586621680959589"><span class="hs-identifier hs-var">rhss_binds</span></a></span><span> </span><span class="annot"><span class="annottext">[(CoreBndr, CoreExprWithFVs)]
</span><a href="#local-6989586621680959596"><span class="hs-identifier hs-var">bindings</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-543"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959588"><span class="hs-identifier hs-var">body_binds</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-544"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-545"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680959592"><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959592"><span class="hs-identifier hs-var">ids</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959587"><span class="annot"><span class="annottext">[CoreExprWithFVs]
</span><a href="#local-6989586621680959587"><span class="hs-identifier hs-var">rhss</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(CoreBndr, CoreExprWithFVs)] -&gt; ([CoreBndr], [CoreExprWithFVs])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="annot"><span class="annottext">[(CoreBndr, CoreExprWithFVs)]
</span><a href="#local-6989586621680959596"><span class="hs-identifier hs-var">bindings</span></a></span><span>
</span><span id="line-546"></span><span>    </span><span id="local-6989586621680959585"><span class="annot"><span class="annottext">rhss_fvs :: [FVAnn]
</span><a href="#local-6989586621680959585"><span class="hs-identifier hs-var hs-var">rhss_fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreExprWithFVs -&gt; FVAnn) -&gt; [CoreExprWithFVs] -&gt; [FVAnn]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#freeVarsOf"><span class="hs-identifier hs-var">freeVarsOf</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreExprWithFVs]
</span><a href="#local-6989586621680959587"><span class="hs-identifier hs-var">rhss</span></a></span><span>
</span><span id="line-547"></span><span>
</span><span id="line-548"></span><span>        </span><span class="hs-comment">-- See Note [extra_fvs (1,2)]</span><span>
</span><span id="line-549"></span><span>    </span><span id="local-6989586621680959584"><span class="annot"><span class="annottext">rule_fvs :: FVAnn
</span><a href="#local-6989586621680959584"><span class="hs-identifier hs-var hs-var">rule_fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreBndr -&gt; FVAnn) -&gt; [CoreBndr] -&gt; FVAnn
forall a. (a -&gt; FVAnn) -&gt; [a] -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#mapUnionDVarSet"><span class="hs-identifier hs-var">mapUnionDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr -&gt; FVAnn
</span><a href="GHC.Core.FVs.html#bndrRuleAndUnfoldingVarsDSet"><span class="hs-identifier hs-var">bndrRuleAndUnfoldingVarsDSet</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959592"><span class="hs-identifier hs-var">ids</span></a></span><span>
</span><span id="line-550"></span><span>    </span><span id="local-6989586621680959582"><span class="annot"><span class="annottext">extra_fvs :: FVAnn
</span><a href="#local-6989586621680959582"><span class="hs-identifier hs-var hs-var">extra_fvs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959584"><span class="hs-identifier hs-var">rule_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSet"><span class="hs-operator hs-var">`unionDVarSet`</span></a></span><span>
</span><span id="line-551"></span><span>                </span><span class="annot"><span class="annottext">[FVAnn] -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSets"><span class="hs-identifier hs-var">unionDVarSets</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959581"><span class="hs-identifier hs-var">rhs_fvs</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959580"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959580"><span class="hs-identifier hs-var">bndr</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959581"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959581"><span class="hs-identifier hs-var">rhs_fvs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959579"><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn
</span><a href="#local-6989586621680959579"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[(CoreBndr, CoreExprWithFVs)]
</span><a href="#local-6989586621680959596"><span class="hs-identifier hs-var">bindings</span></a></span><span>
</span><span id="line-552"></span><span>                              </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">RecFlag -&gt; CoreBndr -&gt; AnnExpr' CoreBndr FVAnn -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoRhs"><span class="hs-identifier hs-var">noFloatIntoRhs</span></a></span><span> </span><span class="annot"><span class="annottext">RecFlag
</span><a href="GHC.Types.Basic.html#Recursive"><span class="hs-identifier hs-var">Recursive</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959580"><span class="hs-identifier hs-var">bndr</span></a></span><span> </span><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn
</span><a href="#local-6989586621680959579"><span class="hs-identifier hs-var">rhs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-553"></span><span>
</span><span id="line-554"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621680959593"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959593"><span class="hs-identifier hs-var">shared_binds</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680959594"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959594"><span class="hs-identifier hs-var">extra_binds</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680959588"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959588"><span class="hs-identifier hs-var">body_binds</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621680959589"><span class="annot"><span class="annottext">[FloatInBinds]
</span><a href="#local-6989586621680959589"><span class="hs-identifier hs-var">rhss_binds</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-555"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Bool -&gt; [FVAnn] -&gt; FloatInBinds -&gt; [FloatInBinds]
</span><a href="GHC.Core.Opt.FloatIn.html#sepBindsByDropPoint"><span class="hs-identifier hs-var">sepBindsByDropPoint</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959599"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-556"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959582"><span class="hs-identifier hs-var">extra_fvs</span></a></span><span class="annot"><span class="annottext">FVAnn -&gt; [FVAnn] -&gt; [FVAnn]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959595"><span class="hs-identifier hs-var">body_fvs</span></a></span><span class="annot"><span class="annottext">FVAnn -&gt; [FVAnn] -&gt; [FVAnn]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[FVAnn]
</span><a href="#local-6989586621680959585"><span class="hs-identifier hs-var">rhss_fvs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-557"></span><span>            </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959598"><span class="hs-identifier hs-var">to_drop</span></a></span><span>
</span><span id="line-558"></span><span>
</span><span id="line-559"></span><span>    </span><span id="local-6989586621680959591"><span class="annot"><span class="annottext">rhs_fvs' :: FVAnn
</span><a href="#local-6989586621680959591"><span class="hs-identifier hs-var hs-var">rhs_fvs'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FVAnn] -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSets"><span class="hs-identifier hs-var">unionDVarSets</span></a></span><span> </span><span class="annot"><span class="annottext">[FVAnn]
</span><a href="#local-6989586621680959585"><span class="hs-identifier hs-var">rhss_fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSet"><span class="hs-operator hs-var">`unionDVarSet`</span></a></span><span>
</span><span id="line-560"></span><span>               </span><span class="annot"><span class="annottext">[FVAnn] -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSets"><span class="hs-identifier hs-var">unionDVarSets</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FloatInBinds -&gt; FVAnn) -&gt; [FloatInBinds] -&gt; [FVAnn]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; FVAnn
</span><a href="GHC.Core.Opt.FloatIn.html#floatedBindsFVs"><span class="hs-identifier hs-var">floatedBindsFVs</span></a></span><span> </span><span class="annot"><span class="annottext">[FloatInBinds]
</span><a href="#local-6989586621680959589"><span class="hs-identifier hs-var">rhss_binds</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSet"><span class="hs-operator hs-var">`unionDVarSet`</span></a></span><span>
</span><span id="line-561"></span><span>               </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959584"><span class="hs-identifier hs-var">rule_fvs</span></a></span><span>         </span><span class="hs-comment">-- Don't forget the rule variables!</span><span>
</span><span id="line-562"></span><span>
</span><span id="line-563"></span><span>    </span><span class="hs-comment">-- Push rhs_binds into the right hand side of the binding</span><span>
</span><span id="line-564"></span><span>    </span><span class="annot"><a href="#local-6989586621680959590"><span class="hs-identifier hs-type">fi_bind</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span class="hs-special">]</span><span>       </span><span class="hs-comment">-- one per &quot;drop pt&quot; conjured w/ fvs_of_rhss</span><span>
</span><span id="line-565"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs"><span class="hs-identifier hs-type">CoreExprWithFVs</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-566"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-567"></span><span>
</span><span id="line-568"></span><span>    </span><span id="local-6989586621680959590"><span class="annot"><span class="annottext">fi_bind :: [FloatInBinds]
-&gt; [(CoreBndr, CoreExprWithFVs)] -&gt; [(CoreBndr, Expr CoreBndr)]
</span><a href="#local-6989586621680959590"><span class="hs-identifier hs-var hs-var">fi_bind</span></a></span></span><span> </span><span id="local-6989586621680959576"><span class="annot"><span class="annottext">[FloatInBinds]
</span><a href="#local-6989586621680959576"><span class="hs-identifier hs-var">to_drops</span></a></span></span><span> </span><span id="local-6989586621680959575"><span class="annot"><span class="annottext">[(CoreBndr, CoreExprWithFVs)]
</span><a href="#local-6989586621680959575"><span class="hs-identifier hs-var">pairs</span></a></span></span><span>
</span><span id="line-569"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959574"><span class="hs-identifier hs-var">binder</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Platform
-&gt; FloatInBinds -&gt; CoreBndr -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiRhs"><span class="hs-identifier hs-var">fiRhs</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959599"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959573"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959574"><span class="hs-identifier hs-var">binder</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959572"><span class="hs-identifier hs-var">rhs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-570"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621680959574"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959574"><span class="hs-identifier hs-var">binder</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959572"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959572"><span class="hs-identifier hs-var">rhs</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959573"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959573"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String
-&gt; [(CoreBndr, CoreExprWithFVs)]
-&gt; [FloatInBinds]
-&gt; [((CoreBndr, CoreExprWithFVs), FloatInBinds)]
forall a b. String -&gt; [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="GHC.Utils.Misc.html#zipEqual"><span class="hs-identifier hs-var">zipEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;fi_bind&quot;</span></span><span> </span><span class="annot"><span class="annottext">[(CoreBndr, CoreExprWithFVs)]
</span><a href="#local-6989586621680959575"><span class="hs-identifier hs-var">pairs</span></a></span><span> </span><span class="annot"><span class="annottext">[FloatInBinds]
</span><a href="#local-6989586621680959576"><span class="hs-identifier hs-var">to_drops</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-571"></span><span>
</span><span id="line-572"></span><span class="hs-comment">------------------</span><span>
</span><span id="line-573"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fiRhs"><span class="hs-identifier hs-type">fiRhs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreBndr"><span class="hs-identifier hs-type">CoreBndr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs"><span class="hs-identifier hs-type">CoreExprWithFVs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-574"></span><span id="fiRhs"><span class="annot"><span class="annottext">fiRhs :: Platform
-&gt; FloatInBinds -&gt; CoreBndr -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiRhs"><span class="hs-identifier hs-var hs-var">fiRhs</span></a></span></span><span> </span><span id="local-6989586621680959570"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959570"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680959569"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959569"><span class="hs-identifier hs-var">to_drop</span></a></span></span><span> </span><span id="local-6989586621680959568"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959568"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span id="local-6989586621680959567"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959567"><span class="hs-identifier hs-var">rhs</span></a></span></span><span>
</span><span id="line-575"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621680959566"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680959566"><span class="hs-identifier hs-var">join_arity</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreBndr -&gt; Maybe Int
</span><a href="GHC.Types.Id.html#isJoinId_maybe"><span class="hs-identifier hs-var">isJoinId_maybe</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959568"><span class="hs-identifier hs-var">bndr</span></a></span><span>
</span><span id="line-576"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959565"><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959565"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621680959564"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959564"><span class="hs-identifier hs-var">body</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; CoreExprWithFVs -&gt; ([CoreBndr], CoreExprWithFVs)
forall bndr annot.
Int -&gt; AnnExpr bndr annot -&gt; ([bndr], AnnExpr bndr annot)
</span><a href="GHC.Core.html#collectNAnnBndrs"><span class="hs-identifier hs-var">collectNAnnBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680959566"><span class="hs-identifier hs-var">join_arity</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959567"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-577"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[CoreBndr] -&gt; Expr CoreBndr -&gt; Expr CoreBndr
forall b. [b] -&gt; Expr b -&gt; Expr b
</span><a href="GHC.Core.html#mkLams"><span class="hs-identifier hs-var">mkLams</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959565"><span class="hs-identifier hs-var">bndrs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959570"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959569"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959564"><span class="hs-identifier hs-var">body</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-578"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-579"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; FloatInBinds -&gt; CoreExprWithFVs -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#fiExpr"><span class="hs-identifier hs-var">fiExpr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959570"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959569"><span class="hs-identifier hs-var">to_drop</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959567"><span class="hs-identifier hs-var">rhs</span></a></span><span>
</span><span id="line-580"></span><span>
</span><span id="line-581"></span><span class="hs-comment">------------------</span><span>
</span><span id="line-582"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoLam"><span class="hs-identifier hs-type">noFloatIntoLam</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Var.html#Var"><span class="hs-identifier hs-type">Var</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-583"></span><span id="noFloatIntoLam"><span class="annot"><span class="annottext">noFloatIntoLam :: [CoreBndr] -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoLam"><span class="hs-identifier hs-var hs-var">noFloatIntoLam</span></a></span></span><span> </span><span id="local-6989586621680959561"><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959561"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(CoreBndr -&gt; Bool) -&gt; [CoreBndr] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr -&gt; Bool
</span><a href="#local-6989586621680959559"><span class="hs-identifier hs-var">bad</span></a></span><span> </span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959561"><span class="hs-identifier hs-var">bndrs</span></a></span><span>
</span><span id="line-584"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-585"></span><span>    </span><span id="local-6989586621680959559"><span class="annot"><span class="annottext">bad :: CoreBndr -&gt; Bool
</span><a href="#local-6989586621680959559"><span class="hs-identifier hs-var hs-var">bad</span></a></span></span><span> </span><span id="local-6989586621680959558"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959558"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CoreBndr -&gt; Bool
</span><a href="GHC.Types.Var.html#isId"><span class="hs-identifier hs-var">isId</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959558"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr -&gt; Bool
</span><a href="GHC.Types.Id.html#isOneShotBndr"><span class="hs-identifier hs-var">isOneShotBndr</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959558"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-586"></span><span>    </span><span class="hs-comment">-- Don't float inside a non-one-shot lambda</span><span>
</span><span id="line-587"></span><span>
</span><span id="line-588"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoRhs"><span class="hs-identifier hs-type">noFloatIntoRhs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Types.Basic.html#RecFlag"><span class="hs-identifier hs-type">RecFlag</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.html#Id"><span class="hs-identifier hs-type">Id</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs%27"><span class="hs-identifier hs-type">CoreExprWithFVs'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-589"></span><span class="hs-comment">-- ^ True if it's a bad idea to float bindings into this RHS</span><span>
</span><span id="line-590"></span><span id="noFloatIntoRhs"><span class="annot"><span class="annottext">noFloatIntoRhs :: RecFlag -&gt; CoreBndr -&gt; AnnExpr' CoreBndr FVAnn -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoRhs"><span class="hs-identifier hs-var hs-var">noFloatIntoRhs</span></a></span></span><span> </span><span id="local-6989586621680959555"><span class="annot"><span class="annottext">RecFlag
</span><a href="#local-6989586621680959555"><span class="hs-identifier hs-var">is_rec</span></a></span></span><span> </span><span id="local-6989586621680959554"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959554"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span id="local-6989586621680959553"><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn
</span><a href="#local-6989586621680959553"><span class="hs-identifier hs-var">rhs</span></a></span></span><span>
</span><span id="line-591"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">CoreBndr -&gt; Bool
</span><a href="GHC.Types.Id.html#isJoinId"><span class="hs-identifier hs-var">isJoinId</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959554"><span class="hs-identifier hs-var">bndr</span></a></span><span>
</span><span id="line-592"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RecFlag -&gt; Bool
</span><a href="GHC.Types.Basic.html#isRec"><span class="hs-identifier hs-var">isRec</span></a></span><span> </span><span class="annot"><span class="annottext">RecFlag
</span><a href="#local-6989586621680959555"><span class="hs-identifier hs-var">is_rec</span></a></span><span> </span><span class="hs-comment">-- Joins are one-shot iff non-recursive</span><span>
</span><span id="line-593"></span><span>
</span><span id="line-594"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-595"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn -&gt; Type -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoArg"><span class="hs-identifier hs-var">noFloatIntoArg</span></a></span><span> </span><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn
</span><a href="#local-6989586621680959553"><span class="hs-identifier hs-var">rhs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr -&gt; Type
</span><a href="GHC.Types.Id.html#idType"><span class="hs-identifier hs-var">idType</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959554"><span class="hs-identifier hs-var">bndr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-596"></span><span>
</span><span id="line-597"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoArg"><span class="hs-identifier hs-type">noFloatIntoArg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.FVs.html#CoreExprWithFVs%27"><span class="hs-identifier hs-type">CoreExprWithFVs'</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.TyCo.Rep.html#Type"><span class="hs-identifier hs-type">Type</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-598"></span><span id="noFloatIntoArg"><span class="annot"><span class="annottext">noFloatIntoArg :: AnnExpr' CoreBndr FVAnn -&gt; Type -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoArg"><span class="hs-identifier hs-var hs-var">noFloatIntoArg</span></a></span></span><span> </span><span id="local-6989586621680959552"><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn
</span><a href="#local-6989586621680959552"><span class="hs-identifier hs-var">expr</span></a></span></span><span> </span><span id="local-6989586621680959551"><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959551"><span class="hs-identifier hs-var">expr_ty</span></a></span></span><span>
</span><span id="line-599"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">HasDebugCallStack =&gt; Type -&gt; Bool
Type -&gt; Bool
</span><a href="GHC.Core.Type.html#isUnliftedType"><span class="hs-identifier hs-var">isUnliftedType</span></a></span><span> </span><span class="annot"><span class="annottext">Type
</span><a href="#local-6989586621680959551"><span class="hs-identifier hs-var">expr_ty</span></a></span><span>
</span><span id="line-600"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-comment">-- See Note [Do not destroy the let/app invariant]</span><span>
</span><span id="line-601"></span><span>
</span><span id="line-602"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.Core.html#AnnLam"><span class="hs-identifier hs-type">AnnLam</span></a></span><span> </span><span id="local-6989586621680959550"><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959550"><span class="hs-identifier hs-var">bndr</span></a></span></span><span> </span><span id="local-6989586621680959549"><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959549"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn
</span><a href="#local-6989586621680959552"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-603"></span><span>   </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959548"><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959548"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs -&gt; ([CoreBndr], CoreExprWithFVs)
forall bndr annot.
AnnExpr bndr annot -&gt; ([bndr], AnnExpr bndr annot)
</span><a href="GHC.Core.html#collectAnnBndrs"><span class="hs-identifier hs-var">collectAnnBndrs</span></a></span><span> </span><span class="annot"><span class="annottext">CoreExprWithFVs
</span><a href="#local-6989586621680959549"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-604"></span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">[CoreBndr] -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#noFloatIntoLam"><span class="hs-identifier hs-var">noFloatIntoLam</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959550"><span class="hs-identifier hs-var">bndr</span></a></span><span class="annot"><span class="annottext">CoreBndr -&gt; [CoreBndr] -&gt; [CoreBndr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959548"><span class="hs-identifier hs-var">bndrs</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- Wrinkle 1 (a)</span><span>
</span><span id="line-605"></span><span>   </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">(CoreBndr -&gt; Bool) -&gt; [CoreBndr] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr -&gt; Bool
</span><a href="GHC.Types.Var.html#isTyVar"><span class="hs-identifier hs-var">isTyVar</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">CoreBndr
</span><a href="#local-6989586621680959550"><span class="hs-identifier hs-var">bndr</span></a></span><span class="annot"><span class="annottext">CoreBndr -&gt; [CoreBndr] -&gt; [CoreBndr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[CoreBndr]
</span><a href="#local-6989586621680959548"><span class="hs-identifier hs-var">bndrs</span></a></span><span class="hs-special">)</span><span>     </span><span class="hs-comment">-- Wrinkle 1 (b)</span><span>
</span><span id="line-606"></span><span>      </span><span class="hs-comment">-- See Note [noFloatInto considerations] wrinkle 2</span><span>
</span><span id="line-607"></span><span>
</span><span id="line-608"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>  </span><span class="hs-comment">-- Note [noFloatInto considerations] wrinkle 2</span><span>
</span><span id="line-609"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr -&gt; Bool
</span><a href="GHC.Core.Utils.html#exprIsTrivial"><span class="hs-identifier hs-var">exprIsTrivial</span></a></span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959543"><span class="hs-identifier hs-var">deann_expr</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr -&gt; Bool
</span><a href="GHC.Core.Utils.html#exprIsHNF"><span class="hs-identifier hs-var">exprIsHNF</span></a></span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959543"><span class="hs-identifier hs-var">deann_expr</span></a></span><span>
</span><span id="line-610"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-611"></span><span>    </span><span id="local-6989586621680959543"><span class="annot"><span class="annottext">deann_expr :: Expr CoreBndr
</span><a href="#local-6989586621680959543"><span class="hs-identifier hs-var hs-var">deann_expr</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn -&gt; Expr CoreBndr
forall bndr annot. AnnExpr' bndr annot -&gt; Expr bndr
</span><a href="GHC.Core.html#deAnnotate%27"><span class="hs-identifier hs-var">deAnnotate'</span></a></span><span> </span><span class="annot"><span class="annottext">AnnExpr' CoreBndr FVAnn
</span><a href="#local-6989586621680959552"><span class="hs-identifier hs-var">expr</span></a></span><span>
</span><span id="line-612"></span><span>
</span><span id="line-613"></span><span class="hs-comment">{- Note [noFloatInto considerations]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When do we want to float bindings into
   - noFloatIntoRHs: the RHS of a let-binding
   - noFloatIntoArg: the argument of a function application

Definitely don't float in if it has unlifted type; that
would destroy the let/app invariant.

* Wrinkle 1: do not float in if
     (a) any non-one-shot value lambdas
  or (b) all type lambdas
  In both cases we'll float straight back out again
  NB: Must line up with fiExpr (AnnLam...); see #7088

  (a) is important: we /must/ float into a one-shot lambda group
  (which includes join points). This makes a big difference
  for things like
     f x# = let x = I# x#
            in let j = \() -&gt; ...x...
               in if &lt;condition&gt; then normal-path else j ()
  If x is used only in the error case join point, j, we must float the
  boxing constructor into it, else we box it every time which is very
  bad news indeed.

* Wrinkle 2: for RHSs, do not float into a HNF; we'll just float right
  back out again... not tragic, but a waste of time.

  For function arguments we will still end up with this
  in-then-out stuff; consider
    letrec x = e in f x
  Here x is not a HNF, so we'll produce
    f (letrec x = e in x)
  which is OK... it's not that common, and we'll end up
  floating out again, in CorePrep if not earlier.
  Still, we use exprIsTrivial to catch this case (sigh)


************************************************************************
*                                                                      *
\subsection{@sepBindsByDropPoint@}
*                                                                      *
************************************************************************

This is the crucial function.  The idea is: We have a wad of bindings
that we'd like to distribute inside a collection of {\em drop points};
insides the alternatives of a \tr{case} would be one example of some
drop points; the RHS and body of a non-recursive \tr{let} binding
would be another (2-element) collection.

So: We're given a list of sets-of-free-variables, one per drop point,
and a list of floating-inwards bindings.  If a binding can go into
only one drop point (without suddenly making something out-of-scope),
in it goes.  If a binding is used inside {\em multiple} drop points,
then it has to go in a you-must-drop-it-above-all-these-drop-points
point.

We have to maintain the order on these drop-point-related lists.
-}</span><span>
</span><span id="line-672"></span><span>
</span><span id="line-673"></span><span class="hs-comment">-- pprFIB :: FloatInBinds -&gt; SDoc</span><span>
</span><span id="line-674"></span><span class="hs-comment">-- pprFIB fibs = text &quot;FIB:&quot; &lt;+&gt; ppr [b | FB _ _ b &lt;- fibs]</span><span>
</span><span id="line-675"></span><span>
</span><span id="line-676"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#sepBindsByDropPoint"><span class="hs-identifier hs-type">sepBindsByDropPoint</span></a></span><span>
</span><span id="line-677"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-678"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>                </span><span class="hs-comment">-- True &lt;=&gt; is case expression</span><span>
</span><span id="line-679"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FreeVarSet"><span class="hs-identifier hs-type">FreeVarSet</span></a></span><span class="hs-special">]</span><span>        </span><span class="hs-comment">-- One set of FVs per drop point</span><span>
</span><span id="line-680"></span><span>                           </span><span class="hs-comment">-- Always at least two long!</span><span>
</span><span id="line-681"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span>        </span><span class="hs-comment">-- Candidate floaters</span><span>
</span><span id="line-682"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span class="hs-special">]</span><span>      </span><span class="hs-comment">-- FIRST one is bindings which must not be floated</span><span>
</span><span id="line-683"></span><span>                           </span><span class="hs-comment">-- inside any drop point; the rest correspond</span><span>
</span><span id="line-684"></span><span>                           </span><span class="hs-comment">-- one-to-one with the input list of FV sets</span><span>
</span><span id="line-685"></span><span>
</span><span id="line-686"></span><span class="hs-comment">-- Every input floater is returned somewhere in the result;</span><span>
</span><span id="line-687"></span><span class="hs-comment">-- none are dropped, not even ones which don't seem to be</span><span>
</span><span id="line-688"></span><span class="hs-comment">-- free in *any* of the drop-point fvs.  Why?  Because, for example,</span><span>
</span><span id="line-689"></span><span class="hs-comment">-- a binding (let x = E in B) might have a specialised version of</span><span>
</span><span id="line-690"></span><span class="hs-comment">-- x (say x') stored inside x, but x' isn't free in E or B.</span><span>
</span><span id="line-691"></span><span>
</span><span id="line-692"></span><span class="hs-keyword">type</span><span> </span><span id="DropBox"><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#DropBox"><span class="hs-identifier hs-var">DropBox</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FreeVarSet"><span class="hs-identifier hs-type">FreeVarSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-693"></span><span>
</span><span id="line-694"></span><span id="sepBindsByDropPoint"><span class="annot"><span class="annottext">sepBindsByDropPoint :: Platform -&gt; Bool -&gt; [FVAnn] -&gt; FloatInBinds -&gt; [FloatInBinds]
</span><a href="GHC.Core.Opt.FloatIn.html#sepBindsByDropPoint"><span class="hs-identifier hs-var hs-var">sepBindsByDropPoint</span></a></span></span><span> </span><span id="local-6989586621680959540"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959540"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621680959539"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680959539"><span class="hs-identifier hs-var">is_case</span></a></span></span><span> </span><span id="local-6989586621680959538"><span class="annot"><span class="annottext">[FVAnn]
</span><a href="#local-6989586621680959538"><span class="hs-identifier hs-var">drop_pts</span></a></span></span><span> </span><span id="local-6989586621680959537"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959537"><span class="hs-identifier hs-var">floaters</span></a></span></span><span>
</span><span id="line-695"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959537"><span class="hs-identifier hs-var">floaters</span></a></span><span>  </span><span class="hs-comment">-- Shortcut common case</span><span>
</span><span id="line-696"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; [FloatInBinds] -&gt; [FloatInBinds]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FVAnn]
</span><a href="#local-6989586621680959538"><span class="hs-identifier hs-var">drop_pts</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-697"></span><span>
</span><span id="line-698"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-699"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">ASSERT</span><span class="hs-special">(</span><span> </span><span class="hs-identifier">drop_pts</span><span> </span><span class="hs-special">`</span><span class="hs-identifier">lengthAtLeast</span><span class="hs-special">`</span><span> </span><span class="hs-number">2</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-700"></span><span>    </span><span class="annot"><span class="annottext">FloatInBinds -&gt; [DropBox] -&gt; [FloatInBinds]
</span><a href="#local-6989586621680959535"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959537"><span class="hs-identifier hs-var">floaters</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FVAnn -&gt; DropBox) -&gt; [FVAnn] -&gt; [DropBox]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621680959534"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959534"><span class="hs-identifier hs-var">fvs</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959534"><span class="hs-identifier hs-var">fvs</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><a href="GHC.Types.Var.Set.html#emptyDVarSet"><span class="hs-identifier hs-var">emptyDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; [FVAnn] -&gt; [FVAnn]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[FVAnn]
</span><a href="#local-6989586621680959538"><span class="hs-identifier hs-var">drop_pts</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-701"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-702"></span><span>    </span><span id="local-6989586621680959532"><span class="annot"><span class="annottext">n_alts :: Int
</span><a href="#local-6989586621680959532"><span class="hs-identifier hs-var hs-var">n_alts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FVAnn] -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">[FVAnn]
</span><a href="#local-6989586621680959538"><span class="hs-identifier hs-var">drop_pts</span></a></span><span>
</span><span id="line-703"></span><span>
</span><span id="line-704"></span><span>    </span><span class="annot"><a href="#local-6989586621680959535"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#DropBox"><span class="hs-identifier hs-type">DropBox</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-705"></span><span>        </span><span class="hs-comment">-- The *first* one in the argument list is the drop_here set</span><span>
</span><span id="line-706"></span><span>        </span><span class="hs-comment">-- The FloatInBinds in the lists are in the reverse of</span><span>
</span><span id="line-707"></span><span>        </span><span class="hs-comment">-- the normal FloatInBinds order; that is, they are the right way round!</span><span>
</span><span id="line-708"></span><span>
</span><span id="line-709"></span><span>    </span><span id="local-6989586621680959535"><span class="annot"><span class="annottext">go :: FloatInBinds -&gt; [DropBox] -&gt; [FloatInBinds]
</span><a href="#local-6989586621680959535"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621680959530"><span class="annot"><span class="annottext">[DropBox]
</span><a href="#local-6989586621680959530"><span class="hs-identifier hs-var">drop_boxes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(DropBox -&gt; FloatInBinds) -&gt; [DropBox] -&gt; [FloatInBinds]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FloatInBinds -&gt; FloatInBinds
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">(FloatInBinds -&gt; FloatInBinds)
-&gt; (DropBox -&gt; FloatInBinds) -&gt; DropBox -&gt; FloatInBinds
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">DropBox -&gt; FloatInBinds
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[DropBox]
</span><a href="#local-6989586621680959530"><span class="hs-identifier hs-var">drop_boxes</span></a></span><span>
</span><span id="line-710"></span><span>
</span><span id="line-711"></span><span>    </span><span class="annot"><a href="#local-6989586621680959535"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959527"><span class="annot"><span class="annottext">bind_w_fvs :: FloatInBind
</span><a href="#local-6989586621680959527"><span class="hs-identifier hs-var">bind_w_fvs</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FB"><span class="hs-identifier hs-type">FB</span></a></span><span> </span><span id="local-6989586621680959526"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959526"><span class="hs-identifier hs-var">bndrs</span></a></span></span><span> </span><span id="local-6989586621680959525"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959525"><span class="hs-identifier hs-var">bind_fvs</span></a></span></span><span> </span><span id="local-6989586621680959524"><span class="annot"><span class="annottext">FloatBind
</span><a href="#local-6989586621680959524"><span class="hs-identifier hs-var">bind</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680959523"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959523"><span class="hs-identifier hs-var">binds</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680959522"><span class="annot"><span class="annottext">drop_boxes :: [DropBox]
</span><a href="#local-6989586621680959522"><span class="hs-identifier hs-var">drop_boxes</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621680959521"><span class="annot"><span class="annottext">DropBox
</span><a href="#local-6989586621680959521"><span class="hs-identifier hs-var">here_box</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680959520"><span class="annot"><span class="annottext">[DropBox]
</span><a href="#local-6989586621680959520"><span class="hs-identifier hs-var">fork_boxes</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-712"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; [DropBox] -&gt; [FloatInBinds]
</span><a href="#local-6989586621680959535"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959523"><span class="hs-identifier hs-var">binds</span></a></span><span> </span><span class="annot"><span class="annottext">[DropBox]
</span><a href="#local-6989586621680959519"><span class="hs-identifier hs-var">new_boxes</span></a></span><span>
</span><span id="line-713"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-714"></span><span>          </span><span class="hs-comment">-- &quot;here&quot; means the group of bindings dropped at the top of the fork</span><span>
</span><span id="line-715"></span><span>
</span><span id="line-716"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621680959518"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680959518"><span class="hs-identifier hs-var">used_here</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680959517"><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621680959517"><span class="hs-identifier hs-var">used_in_flags</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959516"><span class="hs-identifier hs-var">fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; Bool
</span><a href="GHC.Types.Var.Set.html#intersectsDVarSet"><span class="hs-operator hs-var">`intersectsDVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959526"><span class="hs-identifier hs-var">bndrs</span></a></span><span>
</span><span id="line-717"></span><span>                                        </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959516"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959516"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[DropBox]
</span><a href="#local-6989586621680959522"><span class="hs-identifier hs-var">drop_boxes</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-718"></span><span>
</span><span id="line-719"></span><span>          </span><span id="local-6989586621680959514"><span class="annot"><span class="annottext">drop_here :: Bool
</span><a href="#local-6989586621680959514"><span class="hs-identifier hs-var hs-var">drop_here</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680959518"><span class="hs-identifier hs-var">used_here</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680959513"><span class="hs-identifier hs-var">cant_push</span></a></span><span>
</span><span id="line-720"></span><span>
</span><span id="line-721"></span><span>          </span><span id="local-6989586621680959512"><span class="annot"><span class="annottext">n_used_alts :: Int
</span><a href="#local-6989586621680959512"><span class="hs-identifier hs-var hs-var">n_used_alts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; [Bool] -&gt; Int
forall a. (a -&gt; Bool) -&gt; [a] -&gt; Int
</span><a href="GHC.Utils.Misc.html#count"><span class="hs-identifier hs-var">count</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621680959517"><span class="hs-identifier hs-var">used_in_flags</span></a></span><span> </span><span class="hs-comment">-- returns number of Trues in list.</span><span>
</span><span id="line-722"></span><span>
</span><span id="line-723"></span><span>          </span><span id="local-6989586621680959513"><span class="annot"><span class="annottext">cant_push :: Bool
</span><a href="#local-6989586621680959513"><span class="hs-identifier hs-var hs-var">cant_push</span></a></span></span><span>
</span><span id="line-724"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680959539"><span class="hs-identifier hs-var">is_case</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680959512"><span class="hs-identifier hs-var">n_used_alts</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680959532"><span class="hs-identifier hs-var">n_alts</span></a></span><span>   </span><span class="hs-comment">-- Used in all, don't push</span><span>
</span><span id="line-725"></span><span>                                                  </span><span class="hs-comment">-- Remember n_alts &gt; 1</span><span>
</span><span id="line-726"></span><span>                          </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680959512"><span class="hs-identifier hs-var">n_used_alts</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; FloatBind -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#floatIsDupable"><span class="hs-identifier hs-var">floatIsDupable</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959540"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">FloatBind
</span><a href="#local-6989586621680959524"><span class="hs-identifier hs-var">bind</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-727"></span><span>                             </span><span class="hs-comment">-- floatIsDupable: see Note [Duplicating floats]</span><span>
</span><span id="line-728"></span><span>
</span><span id="line-729"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatBind -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#floatIsCase"><span class="hs-identifier hs-var">floatIsCase</span></a></span><span> </span><span class="annot"><span class="annottext">FloatBind
</span><a href="#local-6989586621680959524"><span class="hs-identifier hs-var">bind</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621680959512"><span class="hs-identifier hs-var">n_used_alts</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-730"></span><span>                             </span><span class="hs-comment">-- floatIsCase: see Note [Floating primops]</span><span>
</span><span id="line-731"></span><span>
</span><span id="line-732"></span><span>          </span><span id="local-6989586621680959519"><span class="annot"><span class="annottext">new_boxes :: [DropBox]
</span><a href="#local-6989586621680959519"><span class="hs-identifier hs-var hs-var">new_boxes</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621680959514"><span class="hs-identifier hs-var">drop_here</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DropBox -&gt; DropBox
</span><a href="#local-6989586621680959498"><span class="hs-identifier hs-var">insert</span></a></span><span> </span><span class="annot"><span class="annottext">DropBox
</span><a href="#local-6989586621680959521"><span class="hs-identifier hs-var">here_box</span></a></span><span> </span><span class="annot"><span class="annottext">DropBox -&gt; [DropBox] -&gt; [DropBox]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[DropBox]
</span><a href="#local-6989586621680959520"><span class="hs-identifier hs-var">fork_boxes</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-733"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DropBox
</span><a href="#local-6989586621680959521"><span class="hs-identifier hs-var">here_box</span></a></span><span> </span><span class="annot"><span class="annottext">DropBox -&gt; [DropBox] -&gt; [DropBox]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[DropBox]
</span><a href="#local-6989586621680959497"><span class="hs-identifier hs-var">new_fork_boxes</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-734"></span><span>
</span><span id="line-735"></span><span>          </span><span id="local-6989586621680959497"><span class="annot"><span class="annottext">new_fork_boxes :: [DropBox]
</span><a href="#local-6989586621680959497"><span class="hs-identifier hs-var hs-var">new_fork_boxes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
-&gt; (DropBox -&gt; Bool -&gt; DropBox) -&gt; [DropBox] -&gt; [Bool] -&gt; [DropBox]
forall a b c. String -&gt; (a -&gt; b -&gt; c) -&gt; [a] -&gt; [b] -&gt; [c]
</span><a href="GHC.Utils.Misc.html#zipWithEqual"><span class="hs-identifier hs-var">zipWithEqual</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;FloatIn.sepBinds&quot;</span></span><span> </span><span class="annot"><span class="annottext">DropBox -&gt; Bool -&gt; DropBox
</span><a href="#local-6989586621680959496"><span class="hs-identifier hs-var">insert_maybe</span></a></span><span>
</span><span id="line-736"></span><span>                                        </span><span class="annot"><span class="annottext">[DropBox]
</span><a href="#local-6989586621680959520"><span class="hs-identifier hs-var">fork_boxes</span></a></span><span> </span><span class="annot"><span class="annottext">[Bool]
</span><a href="#local-6989586621680959517"><span class="hs-identifier hs-var">used_in_flags</span></a></span><span>
</span><span id="line-737"></span><span>
</span><span id="line-738"></span><span>          </span><span class="annot"><a href="#local-6989586621680959498"><span class="hs-identifier hs-type">insert</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#DropBox"><span class="hs-identifier hs-type">DropBox</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#DropBox"><span class="hs-identifier hs-type">DropBox</span></a></span><span>
</span><span id="line-739"></span><span>          </span><span id="local-6989586621680959498"><span class="annot"><span class="annottext">insert :: DropBox -&gt; DropBox
</span><a href="#local-6989586621680959498"><span class="hs-identifier hs-var hs-var">insert</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621680959495"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959495"><span class="hs-identifier hs-var">fvs</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621680959494"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959494"><span class="hs-identifier hs-var">drops</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959495"><span class="hs-identifier hs-var">fvs</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn -&gt; FVAnn -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#unionDVarSet"><span class="hs-operator hs-var">`unionDVarSet`</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959525"><span class="hs-identifier hs-var">bind_fvs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FloatInBind
</span><a href="#local-6989586621680959527"><span class="hs-identifier hs-var">bind_w_fvs</span></a></span><span class="annot"><span class="annottext">FloatInBind -&gt; FloatInBinds -&gt; FloatInBinds
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959494"><span class="hs-identifier hs-var">drops</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-740"></span><span>
</span><span id="line-741"></span><span>          </span><span id="local-6989586621680959496"><span class="annot"><span class="annottext">insert_maybe :: DropBox -&gt; Bool -&gt; DropBox
</span><a href="#local-6989586621680959496"><span class="hs-identifier hs-var hs-var">insert_maybe</span></a></span></span><span> </span><span id="local-6989586621680959493"><span class="annot"><span class="annottext">DropBox
</span><a href="#local-6989586621680959493"><span class="hs-identifier hs-var">box</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DropBox -&gt; DropBox
</span><a href="#local-6989586621680959498"><span class="hs-identifier hs-var">insert</span></a></span><span> </span><span class="annot"><span class="annottext">DropBox
</span><a href="#local-6989586621680959493"><span class="hs-identifier hs-var">box</span></a></span><span>
</span><span id="line-742"></span><span>          </span><span class="annot"><a href="#local-6989586621680959496"><span class="hs-identifier hs-var">insert_maybe</span></a></span><span> </span><span id="local-6989586621680959492"><span class="annot"><span class="annottext">DropBox
</span><a href="#local-6989586621680959492"><span class="hs-identifier hs-var">box</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DropBox
</span><a href="#local-6989586621680959492"><span class="hs-identifier hs-var">box</span></a></span><span>
</span><span id="line-743"></span><span>
</span><span id="line-744"></span><span>    </span><span class="annot"><a href="#local-6989586621680959535"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[DropBox]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [FloatInBinds]
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;sepBindsByDropPoint/go&quot;</span></span><span>
</span><span id="line-745"></span><span>
</span><span id="line-746"></span><span>
</span><span id="line-747"></span><span class="hs-comment">{- Note [Duplicating floats]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For case expressions we duplicate the binding if it is reasonably
small, and if it is not used in all the RHSs This is good for
situations like
     let x = I# y in
     case e of
       C -&gt; error x
       D -&gt; error x
       E -&gt; ...not mentioning x...

If the thing is used in all RHSs there is nothing gained,
so we don't duplicate then.
-}</span><span>
</span><span id="line-762"></span><span>
</span><span id="line-763"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#floatedBindsFVs"><span class="hs-identifier hs-type">floatedBindsFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FreeVarSet"><span class="hs-identifier hs-type">FreeVarSet</span></a></span><span>
</span><span id="line-764"></span><span id="floatedBindsFVs"><span class="annot"><span class="annottext">floatedBindsFVs :: FloatInBinds -&gt; FVAnn
</span><a href="GHC.Core.Opt.FloatIn.html#floatedBindsFVs"><span class="hs-identifier hs-var hs-var">floatedBindsFVs</span></a></span></span><span> </span><span id="local-6989586621680959490"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959490"><span class="hs-identifier hs-var">binds</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FloatInBind -&gt; FVAnn) -&gt; FloatInBinds -&gt; FVAnn
forall a. (a -&gt; FVAnn) -&gt; [a] -&gt; FVAnn
</span><a href="GHC.Types.Var.Set.html#mapUnionDVarSet"><span class="hs-identifier hs-var">mapUnionDVarSet</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBind -&gt; FVAnn
</span><a href="GHC.Core.Opt.FloatIn.html#fbFVs"><span class="hs-identifier hs-var">fbFVs</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959490"><span class="hs-identifier hs-var">binds</span></a></span><span>
</span><span id="line-765"></span><span>
</span><span id="line-766"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#fbFVs"><span class="hs-identifier hs-type">fbFVs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBind"><span class="hs-identifier hs-type">FloatInBind</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Var.Set.html#DVarSet"><span class="hs-identifier hs-type">DVarSet</span></a></span><span>
</span><span id="line-767"></span><span id="fbFVs"><span class="annot"><span class="annottext">fbFVs :: FloatInBind -&gt; FVAnn
</span><a href="GHC.Core.Opt.FloatIn.html#fbFVs"><span class="hs-identifier hs-var hs-var">fbFVs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FB"><span class="hs-identifier hs-type">FB</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680959488"><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959488"><span class="hs-identifier hs-var">fvs</span></a></span></span><span> </span><span class="annot"><span class="annottext">FloatBind
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><a href="#local-6989586621680959488"><span class="hs-identifier hs-var">fvs</span></a></span><span>
</span><span id="line-768"></span><span>
</span><span id="line-769"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-type">wrapFloats</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FloatInBinds"><span class="hs-identifier hs-type">FloatInBinds</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.html#CoreExpr"><span class="hs-identifier hs-type">CoreExpr</span></a></span><span>
</span><span id="line-770"></span><span class="hs-comment">-- Remember FloatInBinds is in *reverse* dependency order</span><span>
</span><span id="line-771"></span><span id="wrapFloats"><span class="annot"><span class="annottext">wrapFloats :: FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var hs-var">wrapFloats</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>               </span><span id="local-6989586621680959487"><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959487"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959487"><span class="hs-identifier hs-var">e</span></a></span><span>
</span><span id="line-772"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#FB"><span class="hs-identifier hs-type">FB</span></a></span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FVAnn
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680959486"><span class="annot"><span class="annottext">FloatBind
</span><a href="#local-6989586621680959486"><span class="hs-identifier hs-var">fl</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621680959485"><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959485"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621680959484"><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959484"><span class="hs-identifier hs-var">e</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FloatInBinds -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Opt.FloatIn.html#wrapFloats"><span class="hs-identifier hs-var">wrapFloats</span></a></span><span> </span><span class="annot"><span class="annottext">FloatInBinds
</span><a href="#local-6989586621680959485"><span class="hs-identifier hs-var">bs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FloatBind -&gt; Expr CoreBndr -&gt; Expr CoreBndr
</span><a href="GHC.Core.Make.html#wrapFloat"><span class="hs-identifier hs-var">wrapFloat</span></a></span><span> </span><span class="annot"><span class="annottext">FloatBind
</span><a href="#local-6989586621680959486"><span class="hs-identifier hs-var">fl</span></a></span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959484"><span class="hs-identifier hs-var">e</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-773"></span><span>
</span><span id="line-774"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#floatIsDupable"><span class="hs-identifier hs-type">floatIsDupable</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Core.Make.html#FloatBind"><span class="hs-identifier hs-type">FloatBind</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-775"></span><span id="floatIsDupable"><span class="annot"><span class="annottext">floatIsDupable :: Platform -&gt; FloatBind -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#floatIsDupable"><span class="hs-identifier hs-var hs-var">floatIsDupable</span></a></span></span><span> </span><span id="local-6989586621680959482"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959482"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Make.html#FloatCase"><span class="hs-identifier hs-type">FloatCase</span></a></span><span> </span><span id="local-6989586621680959481"><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959481"><span class="hs-identifier hs-var">scrut</span></a></span></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">AltCon
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[CoreBndr]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Expr CoreBndr -&gt; Bool
</span><a href="GHC.Core.Utils.html#exprIsDupable"><span class="hs-identifier hs-var">exprIsDupable</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959482"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959481"><span class="hs-identifier hs-var">scrut</span></a></span><span>
</span><span id="line-776"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#floatIsDupable"><span class="hs-identifier hs-var">floatIsDupable</span></a></span><span> </span><span id="local-6989586621680959479"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959479"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Make.html#FloatLet"><span class="hs-identifier hs-type">FloatLet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#Rec"><span class="hs-identifier hs-type">Rec</span></a></span><span> </span><span id="local-6989586621680959478"><span class="annot"><span class="annottext">[(CoreBndr, Expr CoreBndr)]
</span><a href="#local-6989586621680959478"><span class="hs-identifier hs-var">prs</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((CoreBndr, Expr CoreBndr) -&gt; Bool)
-&gt; [(CoreBndr, Expr CoreBndr)] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Expr CoreBndr -&gt; Bool
</span><a href="GHC.Core.Utils.html#exprIsDupable"><span class="hs-identifier hs-var">exprIsDupable</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959479"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">(Expr CoreBndr -&gt; Bool)
-&gt; ((CoreBndr, Expr CoreBndr) -&gt; Expr CoreBndr)
-&gt; (CoreBndr, Expr CoreBndr)
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(CoreBndr, Expr CoreBndr) -&gt; Expr CoreBndr
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[(CoreBndr, Expr CoreBndr)]
</span><a href="#local-6989586621680959478"><span class="hs-identifier hs-var">prs</span></a></span><span>
</span><span id="line-777"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#floatIsDupable"><span class="hs-identifier hs-var">floatIsDupable</span></a></span><span> </span><span id="local-6989586621680959477"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959477"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Make.html#FloatLet"><span class="hs-identifier hs-type">FloatLet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.html#NonRec"><span class="hs-identifier hs-type">NonRec</span></a></span><span> </span><span class="annot"><span class="annottext">CoreBndr
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621680959476"><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959476"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Expr CoreBndr -&gt; Bool
</span><a href="GHC.Core.Utils.html#exprIsDupable"><span class="hs-identifier hs-var">exprIsDupable</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621680959477"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Expr CoreBndr
</span><a href="#local-6989586621680959476"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-778"></span><span>
</span><span id="line-779"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#floatIsCase"><span class="hs-identifier hs-type">floatIsCase</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Core.Make.html#FloatBind"><span class="hs-identifier hs-type">FloatBind</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-780"></span><span id="floatIsCase"><span class="annot"><span class="annottext">floatIsCase :: FloatBind -&gt; Bool
</span><a href="GHC.Core.Opt.FloatIn.html#floatIsCase"><span class="hs-identifier hs-var hs-var">floatIsCase</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Make.html#FloatCase"><span class="hs-identifier hs-type">FloatCase</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-781"></span><span class="annot"><a href="GHC.Core.Opt.FloatIn.html#floatIsCase"><span class="hs-identifier hs-var">floatIsCase</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Core.Make.html#FloatLet"><span class="hs-identifier hs-type">FloatLet</span></a></span><span> </span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-782"></span></pre></body></html>